JavaScript How to set value for hidden variable in jquery

I am trying to set value 1 for hidden field while making checkboxes as false to not fire the CheckedChanged event.

$('#<%=FindControl("hdfValidateCheck").ClientID %>').val("1");
$get('<%= FindControl("chkUK").ClientID %>').checked = false;
$get('<%= FindControl("chkUS").ClientID %>').checked = false;
$('#<%=FindControl("hdfValidateCheck").ClientID %>').val("0");

But here hidden fields are not set properly and the following code executes completely

protected void chkUS_CheckedChanged(object sender, EventArgs e)
{
    if (chkUS.Checked)
    {
        if (hdfValidateCheck.Value == "0")
        {
            radWindowManager.RadConfirm("Are you sure you want to check?", "confirm" + this.ClientID, 300, 100, null, "");
        }
    }
}

I want this line $('#<%=FindControl("hdfValidateCheck").ClientID %>').val("1"); to be corrected and even I want to shift the chkUS_CheckedChanged event from Server side to Client side.

Answer:1

I have an array like this ["Apr 2014", "Sep 2015", "Jul 2010", "Jun 2016", "Sep 2013"] I want to sort this array as dates. But when i am using this in date function as new Date("Apr 2014") it shows ...

I have an array like this ["Apr 2014", "Sep 2015", "Jul 2010", "Jun 2016", "Sep 2013"] I want to sort this array as dates. But when i am using this in date function as new Date("Apr 2014") it shows ...

I have here-under a simple example of spline chart with data label enabled : dataLabels: {enabled: true} http://jsfiddle.net/gc8144kv/ I would like to have the data labels on top of the graph ...

I have here-under a simple example of spline chart with data label enabled : dataLabels: {enabled: true} http://jsfiddle.net/gc8144kv/ I would like to have the data labels on top of the graph ...

I have a kendo grid with custom popup edit window to imitate popup edit, but with batch edit. Everything works fine, but I am experiencing a small issue. Whenever value is changed, the grid cell does ...

I have a kendo grid with custom popup edit window to imitate popup edit, but with batch edit. Everything works fine, but I am experiencing a small issue. Whenever value is changed, the grid cell does ...

I am setting up foundations for a websocket app using node.js, express and socket.io. I decided it would be elegant to place the code that sets up socket.io in a separate module, so my server.js file ...

I am setting up foundations for a websocket app using node.js, express and socket.io. I decided it would be elegant to place the code that sets up socket.io in a separate module, so my server.js file ...