Checkbox and Jquery |
[eluser]bondjp[/eluser]
Hi I'm having a problem getting the value of the checkbox into my controller. The problem is the alert windows is always telling me the value is unchecked(0). Can someone please tell me what i'm doing wrong? View: Code: [removed]
[eluser]danmontgomery[/eluser]
Code: if($('#subscribe').is(':checked')) http://forum.jquery.com/using-jquery Also, you've assigned the ID to the td, so this won't work anyway. You can't have two elements with the same ID and expect javascript to know which one you mean. You need to change the selector to look for the checkbox inside #subscribe, or give the ID to (only) the checkbox itself.
|
Welcome Guest, Not a member yet? Register Sign In |