I'm new to jQuery. I need to call the method after some interval.
$(document).ready(function pageLoad() {
setTimeout('SetTime2()', 10000);
});
(function SetTime2() {
$.ajax({
type: "POST",
url: "MyPage.aspx/myStaticMethod",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
// Replace the div's content with the page method's return.
//$("#Result").text(msg.d);
}
});
});
It says, Uncaught ReferenceError: SetTime2 is not defined. What is the correct syntax? Thanks.