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 9082961
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T20:40:24+00:00 2026-06-16T20:40:24+00:00

This is the code in the html/javascrpt file: var console = console || {log:function(msg){window.runtime.trace(msg);}};

  • 0

This is the code in the html/javascrpt file:

var console = console || 
    {log:function(msg){window.runtime.trace(msg);}};
function waitToFinish(){
    console.log("this is wait to finish loading the url");
    console.log(this.readyState);
    console.log(this.status);
    if(this.readyState != 4){
        return;
    }
    console.log("readystate is 4");
    console.log("response text length is:"+this.responseText.length);
    if (this.status === 200 || this.status == 304) { // status is allways 0
        console.log("success");
        console.log("response text length is:"+this.responseText.length);
    }
}
function openURL(url){
    console.log("opening link:"+url);
    xmlhttp = new XMLHttpRequest();
    xmlhttp.open("GET", url 
            ,true);
    xmlhttp.onreadystatechange
        =waitToFinish;
    xmlhttp.send(null);
    return false; 
<input type=button onclick="openURL('http://www.yahoo.com');" value="click me" />
}

Here is the output in air:

opening link:http://www.yahoo.com
this is wait to finish loading the url
4
0
readystate is 4
response text length is:0

This is the output in firefox with forcecors plugin activated:

opening link:http://www.yahoo.com
GET http://www.yahoo.com/ 200 OK        4.3s    
this is wait to finish loading the url
1
0
this is wait to finish loading the url
2
200
this is wait to finish loading the url
... a bunch of times readystate change is called
this is wait to finish loading the url
4
200
readystate is 4
response text length is:317163
success
response text length is:317163

In air onreadystate is called once and that’s it, state is immediately 4 but status stays 0 and responseText is empty.

http://help.adobe.com/en_US/AIR/1.5/devappshtml/WS5b3ccc516d4fbf351e63e3d118666ade46-7eb3.html

Shows an example for xmlhttprequest checking only for readystate but if I do that the responseText is empty all the time every time. Synchronyous requests work but async doesn’t

  • 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-16T20:40:25+00:00Added an answer on June 16, 2026 at 8:40 pm

    On Windows AIR uses IE so when my IE was set to work offline I had strange things happen with the request. Some were ok as they were in cache and some would fail.

    Set IE to work online and everything was working “normal” again.

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

Sidebar

Related Questions

i have this html and javascript program code for log in window. my html
I pasted the code given in this link to a file called md5.js. http://www.webtoolkit.info/javascript-md5.html
I have javascript code embedded inside a html template file. When I load this
Ok, I have this code: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script> <script type=text/javascript> function get()
This is the JavaScript code in the Chrome background.html. var plugin = document.getElementById(reverbPlugin); if
OK i have this code HTML: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js> </script> <script type=text/javascript>
This code gets html data and should replace all javascript content $.ajax({ url: url,
Following this code my button works perfectly: http://twitter.github.com/bootstrap/javascript.html#modals Fades and everything. I want to
I have this html code <html> <head> <title>JQuery Problem 2</title> <script type=text/javascript src=jquery-1.4.min.js></script> <script
I run this code here <html> <script type=text/javascript src=lib/jquery-ui-1.8.21.custom.min.js></script> <script src=http://127.0.0.1:5984/_utils/script/jquery.couch.js></script> <!--<script type=text/javascript src=lib/jquery-1.7.2.js></script>-->

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.