XMLHTTP is not working with Firefox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Deanorezo
    New Member
    • Sep 2012
    • 2

    XMLHTTP is not working with Firefox

    this is killing me. It works fine with IE but nothing with Firefox. Can anyone help please
    it should grab text from klm2 and the response should print to klm3

    Code:
    <script>
    function PostOrder() 
    { 
    var done1;
       var xmlhttp = new XMLHttpRequest();   strPOSTURL="http://localhost/server/MYDLL.asp"
       xmlhttp.Open("POST", strPOSTURL, false); 
      xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
       xmlhttp.Send(document.getElementById("klm2").value); 
       done1=xmlhttp.responseText; 
       document.getElementById("klm3").value=done1.replace(/<(?:.|\n)*?>/gm, '');
        
    } 
    </script> <textarea name=klm3 id="klm2" rows=10 cols=115>THIS IS A TEST<br> <textarea name=klm3 id="klm3" rows=25 cols=115>
    Last edited by zmbd; Sep 29 '12, 07:12 AM. Reason: Please format code and SQL using the <CODE/> button
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    JS is case-sensitive, so the XHR methods should be open() and send().

    also check the Error Console for further issues.

    Comment

    • Deanorezo
      New Member
      • Sep 2012
      • 2

      #3
      Thanks Dormilich. good catch. i wasnt even looking at that.
      Thanks again

      Comment

      Working...