| | |
How to pass Checkbox status to jave method as parameter..
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Feb 2009
Posts: 1
Reputation:
Solved Threads: 0
Hi,
I've one checkbox,I need to capture the status of this checkbox(i.e checked is "true" and unchecked is "false") to the java method as parameter.
Please advise if there is any way i can accomplish this..
I've check box like this
[code>
<h:selectBooleanCheckbox id="checkMedia" onclick="toggleDeleteAll()"/>
[/code]
Javascript to get the status of check box like this..
I need to pass the return value of the javascript to the java method in command link action like thiss.
Please advise me if anybody has inputs..
Thanks,
Anil
I've one checkbox,I need to capture the status of this checkbox(i.e checked is "true" and unchecked is "false") to the java method as parameter.
Please advise if there is any way i can accomplish this..
I've check box like this
[code>
<h:selectBooleanCheckbox id="checkMedia" onclick="toggleDeleteAll()"/>
[/code]
Javascript to get the status of check box like this..
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
function toggleDeleteAll(){ if(deleteAll == 'false') deleteAll = 'true'; else deleteAll = 'false'; return deleteAll; }
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
<h:commandLink id="delete" action="#{VehicleListingController.delete(VehicleListingController.vehicle,deleteAll)}" value="DELETE">
Thanks,
Anil
![]() |
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Ajax Search as google?
- Next Thread: clear-remove all child nodes in javascript
| Thread Tools | Search this Thread |
ajax ajaxexample ajaxjspservlets array browser bug captcha captchaformproblem cart checkbox child class close codes cookies createrange() cursor date debugger dependent disablefirebug dom dropdown editor element embed engine enter events explorer ext file firefox form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl maps marquee masterpage math matrixcaptcha media menu object onerror onmouseoutdivproblem onreadystatechange parent paypal pdf php position post programming progressbar prototype rated redirect runtime safari scale scriptlets scroll search security session shopping size software star stars synchronous toggle unicode variables web webservice wysiwyg \n





