• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Javascript in Struts

 
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
 
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
 
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(...)">
    Bookmark Topic Watch Topic
  • New Topic