Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript in Struts

 
Girya
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a page which uses a logic:iterate tag to display a table containing a number of fields.
One of the columns in the table is a checkbox.
Here is my requirement:
When the user clicks on the checkbox, I want a value in one column of that row to be copied over to another column in the same row.
I want to do this using Javascript but I do not want to use the Validator plugin as that may cause a lot of changes in our existing functionality.
Is there some way in which I can write the Javascript?
Thanks & Regards,
Girish
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Girya,
JavaRanch has a naming policy which is strictly enforced. Please read the policy and change your display name if you wish to continue posting here.
You can change your name: here
 
Ravi Veera
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the Checkboxes onclick/onchange attribute to make a call to a Javascript function.
something like
<html:checkbox property="something" onchange= "copyValue(...)">
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic