File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Checkbox implementation using javascript in JSP

 
anand gaddam
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a single form which has 2 subforms inherited in it.
I have a checkbox,whenever i click it it should open the subform.and when it is unchecked the values entered into original form should be saved.i want to write a javascript function in the JSP page.And please suggest me is it needed any action class in struts if not then what are the ways we can implement it.If any body help me in this case would be appreciated
Thanks in Advance,
Anand
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moved to the HTML/JavaScript forum.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64173
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What have you written so far? Obviously you need an event handler for the checkbox and some CSS to hide and show the subform.
 
anand gaddam
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wrote a PrepareCaseFileForm data capturing and for the above event i wrote a function like:
function checkValue()
{
if(document.PrepareCaseFileForm.RGOOverridingRouting=="None")
checked=false
else(document.PrepareCaseFileForm.RGOOverrideRouting=="overrideRouting")
checked=true
}
does this work please help me?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic