Note that there are some explanatory texts on larger screens.

plurals
  1. POAjax code is not working with other than Chrome
    primarykey
    data
    text
    <p><strong>My Ajax code</strong> works fine for <strong>Chrome</strong> but it <strong>doesn't give me anything when i try to</strong> run it using <strong>other browsers like Mozilla , IE7 opera</strong>. I am uploading my code here please tell me where is problem </p> <pre><code>function ajaxFunction(str){ var ajaxRequest; // The variable that makes Ajax possible! alert("in ajax"); try{ // Opera 8.0+, Firefox, Safari ajaxRequest = new XMLHttpRequest(); } catch (e){ // Internet Explorer Browsers try{ ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try{ ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){ // Something went wrong alert("Your browser broke!"); return false; } } } ajaxRequest.onreadystatechange = function(){ if((ajaxRequest.readyState == 4)){ var msg=ajaxRequest.responseText var fld=document.getElementById("prtCnt"); alert('"' + msg + '"'); msg = msg.trim(); if(msg == "not") { var msg="This User Name is already taken !!!!"; fld.className="bp_invalid"; // fld.style.color=green; fld.innerHTML=msg; } else if(msg == "yes") { var msg="This User Name is available !!!!"; fld.className="bp_valid"; // fld.style.color=green; fld.innerHTML=msg; } //document.myForm.time.value = ""; //document.myForm.time.value = ajaxRequest.responseText; } } var fld =document.getElementById(user); var url="loadjsp.jsp"; url=url+"?user="+str; ajaxRequest.open("GET",url, true); ajaxRequest.send(null); } </code></pre> <p>Please tell me if anybody. I am new to ajax. thanx</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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