April 23, 2011

JavaScript is not working on child page in ASP.Net

var disttrict= document.getElementById("ctl00$ContentPlaceHolder1$Dist").value;

if (disttrict == "-1")
{
alert('Please select district!');
document.getElementById("ctl00$ContentPlaceHolder1$Dist").focus();
return(false);
}

No comments:

Post a Comment