I have a asp timer and on focus of the textbox i want to disable the timer so that when user is entering the page is not refreshed at the timer tick.
how can i do that with an ajax call
Below is a sample .... for some reason _starttimer and stotimer is not working.It works only when i place an alert after the stop or start timer code in the jquery focusin block.
$(document).ready(function () {
$("#<%= textFind.ClientID %>").focusin(function () {
var timerValue = $find('<%= timerShowDirectory.ClientID %>');
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "Login.aspx/TimerDisable",
data: "{'timerValue':'" + timerValue + "'}",
dataType: "json",
});
});
});
<Services.WebMethod()>
Public Shared Function TimerDisable(ByVal timerValue As String) As String
Try
??????convert the timer string totimer control and enable false ...how?
Catch
End Try
End Function