TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Senthil Varadharajan
NA
5
581
Refresh grid while database updating
Feb 21 2018 2:21 AM
<script type="text/javascript">
var count = 0;
window.onload = function () {
setInterval(ToCallDB, 1000);
// ToCallDB();
};
function ToCallDB() {
var options = {
type: "POST",
url: "Copy of admissionstatus.aspx/retttt",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (response) {
$('#<%= Label1.ClientID%>').text(response.d[0]);
$('#<%= Label2.ClientID%>').text(response.d[1]);
},
error: function (response) {
},
complete: function () {
}
};
$.ajax(options);
}
</script>
This is my ajax call for refreshing label every 1 sec. Here i do want to update the label when database has been updated.
Is it possible without setInterval()?
Reply
Answers (
1
)
Move cursor and limit characters using JQUERY
I have to generate a dynamic text box with unique id