The Follwing JS Code on 'endRequest' Function Will Be Execute After AJAX Request
Ex: After Submitting ASP.NET Form
function pageLoad() {
var manager = Sys.WebForms.PageRequestManager.getInstance();
manager.add_endRequest(endRequest);
}
function endRequest(sender, args) {
//Add Your JS Code Here
window.scrollTo(0, 300);
}
Sunday, July 11, 2010
Check ASP.NET Page If Valid Using JavaScript
Check ASP.NET Page If Valid (All Validating Form Input Controls Are Valid) Using JavaScript
function ValidatePage() {
if (typeof(Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
if (Page_IsValid) {
//Add Your JavaScript If Page Valid.
document.getElementById('divCaution').style.display = 'none';
}
else {
//Add Your JavaScript If Page Not Valid.
document.getElementById('divCaution').style.display = 'block';
}
}
function ValidatePage() {
if (typeof(Page_ClientValidate) == 'function') {
Page_ClientValidate();
}
if (Page_IsValid) {
//Add Your JavaScript If Page Valid.
document.getElementById('divCaution').style.display = 'none';
}
else {
//Add Your JavaScript If Page Not Valid.
document.getElementById('divCaution').style.display = 'block';
}
}
Subscribe to:
Posts (Atom)