*
The moose likes HTML, CSS and JavaScript and the fly likes Checkbox implementation using javascript in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Checkbox implementation using javascript in JSP" Watch "Checkbox implementation using javascript in JSP" New topic
Author

Checkbox implementation using javascript in JSP

anand gaddam
Greenhorn

Joined: Jul 27, 2007
Posts: 3
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

Joined: Jan 10, 2002
Posts: 61092
    
  66

Moved to the HTML/JavaScript forum.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61092
    
  66

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

Joined: Jul 27, 2007
Posts: 3
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?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Checkbox implementation using javascript in JSP