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

  • SEARCH
  • Home
  • 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 9173205
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:32:07+00:00 2026-06-17T16:32:07+00:00

It’s quite simple. The Adobe AIR application’s main window is an html file, and

  • 0

It’s quite simple. The Adobe AIR application’s main window is an html file, and the application.xml looks like this:

  <initialWindow>
    <title>window title</title>
    <content>index.html</content>

index.html looks like this:

<script type="text/javascript" 
    src="http://www.mysite.com/mybanner.js" id="add"></script>
<script type="text/javascript">
    document.write("<h1>this is strange</h1>");
    alert(document.getElementById("add").src);
    function getJS(){
        document.getElementById("add").src="http://www.mysite.com/mybanner.js";
        xmlhttp = new XMLHttpRequest(); 
        xmlhttp.open("GET", "http://www.mysite.com/mybanner.js"
            ,false);
        xmlhttp.send(null);
        if (xmlhttp.status === 200) {
            alert(xmlhttp.responseText);
        eval(xmlhttp.responseText);

        }else{
            throw("Can't open url, response status is:"+xmlhttp.status);
        }
    }
</script>
<input type="button" onclick="getJS();" value="getJS" />

When opening the app it displays “this is strange” and alerts the source of the other script tag (the banner) but doesn’t display anything. Clicking the getJS button alerts the content of the js file but still doesn’t display anything. The eval causes an AIR runtime security violation. Opening the file in Internet Explorer or Firefox shows the banner so there is no error in the script or src.

I run it in flashDevelop and don’t see any warnings or error in the output, can connect to any site using xmlhttprequest (usually not allowed in browsers) but can’t load a simple js file from server.

Can anyone help me in solving this?

  • 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-17T16:32:08+00:00Added an answer on June 17, 2026 at 4:32 pm

    I guess document.write doesn’t work if the source of the script isn’t local.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
For some reason, after submitting a string like this Jack’s Spindle from a text
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters
I am trying to render a haml file in a javascript response like so:
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We are using XSLT to translate a RIXML file to XML. Our RIXML contains

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.