Note that there are some explanatory texts on larger screens.

plurals
  1. POSame Ajax is not working in IE more than one time
    text
    copied!<p>i my webpage when the user click forgot password button i ask email , Securitykey etc.. when the user click the sendmail button i send the email,securitykey, etc to a ajax function named 'sendmail(par1,par2,par3)' [Code is below]. The user provide Existing mailid , securitykey... , rtstr[1] is set to 1 [one] . So the 'Mail send successfully' was displayed . But if the user again enter the info [without refreshing the page]and click sendmail button, it didn't work in IE. But it works perfectly in Firefox.</p> <pre><code>var xmlhttp1; xmlhttp1 = GetXmlHttpObject(); function sendmail(Mailforpwd, Secquestion, Secanswer) { if (xmlhttp1 == null) { alert("Browser does not support HTTP Request"); return; } var url = "SendEmail.php"; url = url + "?Email=" + Mailforpwd; url = url + "&amp;Squestion=" + Secquestion; url = url + "&amp;Sanswer=" + Secanswer; xmlhttp1.onreadystatechange = stateChanged; xmlhttp1.open("GET", url, true); xmlhttp1.send(null); function stateChanged() { if (xmlhttp1.readyState == 4) { var Result = xmlhttp1.responseText; rtstr = Result.split('#'); //alert(xmlhttp1.responseText); //alert(rtstr[0]); //alert(rtstr[0]); if (rtstr[0] == 1) { document.getElementById("Errorcredentials").innerHTML = "Mail send successfully"; } else if (rtstr[1] == 0) { //alert(document.getElementById("Errorcredentials").innerHTML); document.getElementById("Errorcredentials").innerHTML = "Please provide Exist information"; } else { document.getElementById("Errorcredentials").innerHTML = "There is a problem in sending mail, please try after sometime"; } } } } function GetXmlHttpObject() { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari return new XMLHttpRequest(); } if (window.ActiveXObject) { // code for IE6, IE5 return new ActiveXObject("Microsoft.XMLHTTP"); } return null; } </code></pre> <p>Here my problem is at second time the function stateChanged() was not called , if i put a alert in this function , first time it display alert box , But next time it won't. This is my problem . The sendMail.php was called eachtime . </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload