aspose file tools*
The moose likes Struts and the fly likes Javascript in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Javascript in Struts " Watch "Javascript in Struts " New topic
Author

Javascript in Struts

Girya
Greenhorn

Joined: Jul 10, 2002
Posts: 2
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

Joined: Mar 09, 2001
Posts: 2676
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


Matthew Phillips
Ravi Veera
Ranch Hand

Joined: Jun 23, 2001
Posts: 127
Use the Checkboxes onclick/onchange attribute to make a call to a Javascript function.
something like
<html:checkbox property="something" onchange= "copyValue(...)">
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javascript in Struts