Sunday, 15 September 2013

Submitting using check box

Submitting using check box

Hi I have following check box and a button. I want to check the box and
than call a function when the button is clicked using jquery.
<form id="rollUpForm" >
<table id="testing" class="" border="1" cellpadding="0"
cellspacing="0">
<tr>
<td>
<td> <label class="" for="_person" >Person</label></td>
<td> <input type="checkbox" class="_person"
id="rollUPForm_vendor" name="person"/></td>
<td><input type="button" id="personList" class=""
value="Search" /></td>
</tr>
</table>
</form>
$(document).ready(function () {
$("#vendorList").click(function () {
if ($("input:checkbox:checked").val() = "vendor") {
fnloadlist();
}
});
});
When I run using firebug. It gives error "ReferenceError: invalid
assignment left-hand side" at if statement. I tried few different things
but nothing seem to work. Please help as I am new to jquery. Thanks

No comments:

Post a Comment