0

I am unable to get the results from the yahoo finance api in Firefox and Chrome .

<script>

if (window.XMLHttpRequest)
      {
          // code for IE7 , Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
  xmlhttp.open("GET","http://finance.yahoo.com/d/quote.csve=.csv&s=^BSESN&f=nl1c2vgh&random=10",true);

    x
    xmlhttp.send(null);

    xmlhttp.onreadystatechange=function()
    {

        //  document.getElementById("myDiv").innerHTML="hi";
         if (xmlhttp.readyState==4)
         {
    window.alert(xmlhttp.status);
    }
            }
</script>

The above working fine in IE showing status message 200. But Firefox,Chrome status result as 0. I facing this issue from the past two days. Please help me.

by
0 Replies

Recent Posts

in General Discussion at YDN