I have Javascript Function that works correctly when the checkbox is checked i.e. sets 'Chk' to true but not when the checkbox is unchecked i.e. also sets 'Chk' to true. The Function then passes two parameters to a second page which runs a Stored Proc (setting a value to true or false). Here is my code:
<script src="Scripts/jquery-1.4.1.js" type="text/javascript" language="javascript"></script>
<script type="text/javascript">
function myfunction(invId, Chk) {
var chkboxValue = ($("#iSelect").is(":checked") ? false : true);
$.ajax({
type: "GET",
url: "upDateMe.aspx?param1=" + invId +"¶m2=" + chkboxValue,
data: "",
contentType: "text/html",
dataType: "text"
});
}