Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8878815
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T19:48:14+00:00 2026-06-14T19:48:14+00:00

if (window.XMLHttpRequest) { xmlhttp=new XMLHttpRequest(); } else {// code for IE6, IE5 xmlhttp=new ActiveXObject(Microsoft.XMLHTTP);

  • 0

if (window.XMLHttpRequest)
{

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);

xmlhttp.send(null);

xmlhttp.onreadystatechange=function()
{

if (xmlhttp.readyState==4)
{
window.alert(xmlhttp.status);
}
}

The above code showing status 200 in IE But in Firefox and Chrome got the status 0 due cross domain functionality.
Can any one help to how to overcome this cross domain functionality using java script.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T19:48:15+00:00Added an answer on June 14, 2026 at 7:48 pm

    Direct call to other domain is not possible from JavaScript ajax due to cross domain issue best way to do this type of call is call your own webpage using Ajax and from your server side script call these apis and get answer and return to your ajax call.

    if you are using php you can use cURL OR file_get_contents to fetch content from url

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

why won't this work? function login(){ if(window.XMLHttpRequest){ ajax=new XMLHttpRequest(); }else if(window.ActiveXObject){ ajax=new ActiveXObject(Microsoft.XMLHTTP); }
function text_window() { var xmlDoc; if (window.XMLHttpRequest) { xmlDoc=new window.XMLHttpRequest(); xmlDoc.open(GET,cd_catalog.xml,false); xmlDoc.send(); xmlDoc=xmlDoc.responseXML; }
function ajax_request(destination_full_url) { if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xmlhttp
I am sending data to a PHP site using the following code: if (window.XMLHttpRequest)
function getWriters(cat, lev, id) { if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome,
how can I do the following by means of jQuery? var xmlhttp; if (window.XMLHttpRequest)
window.open() why window.open always pop up with IE , I set firefox is the
Window.open javascript function is not working in Mozilla, but working in other browsers, here
the window.open() object has some funky parameter list... is there a way to do
im quite new to php and javascript but still trying to get my webpage

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.