Hi to all,
I have a Web Service to Check the User Name is Already Exists or Not.
I have called the Web Service In .cs(Code Behind) file like Following.
txtUserName.Attributes.Add("onChange","return CheckUserNameAvailability()");
function CheckCommonMasterAvailability() {
masterCheck = document.getElementById('ctl00_cphMaster_hdnStatus');
setTimeout("", 10000);
if ((document.getElementById('ctl00_cphMaster_hdnValue').value == "") || (document.getElementById('ctl00_cphMaster_hdnValue').value.toUpperCase() != Trim(txtCommonName.value().toUpperCase()))) {
if ((ddlReferenceCode.value() != "0") && (Trim(txtCommonName.value()) != "")) {
masterValue = Trim(txtCommonName.value());
SCMService.CheckMasterAvilability("COMMONMASTER", Trim(txtCommonName.value()), ddlReferenceCode.value(), "", "", "", OnMasterCheck);
return false;
}
}
else {
masterCheck.value = "0";
}
}
if Suppose the user enter the name and suddenly click the save button the onChange event wont perform Suddenly before the control is going to server, so it saved and then the onchange event called.
i check the status value that is return by webservice method. but the method called after control is going to server and then the onchange event is performed.
It Works Properly in IE but not in FireFox..
How can i solve this problem?
Is there any other way to do this?
Thanks to all