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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T10:22:26+00:00 2026-06-13T10:22:26+00:00

I have the following javascript code (at bottom) that I inject per api call

  • 0

I have the following javascript code (at bottom) that I inject per api call for clients from their published websites.

Clients within their web page make a script tag call such as:

<div id="myDivID"/>
<script type="text/javascript" src="http//:srv.ab.com/api/getswf?divIdToReplace=myDivID"></script>

Once that is executed the following code is injected from the api call and replaces the div with a swf:

<script type="text/javascript">

        (function () {

            var object = document.createElement('object');
            object.setAttribute('width', '300');
            object.setAttribute('height', '250');
            object.setAttribute('classid', 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000');

            var param1 = document.createElement('param');
            param1.setAttribute('name', 'movie');
            param1.setAttribute('value', 'http://srv.ab.com/test.swf');

            var embed = document.createElement('embed');
            embed.setAttribute('src', 'http://srv.ab.com/test.swf');
            embed.setAttribute('width', '300');
            embed.setAttribute('height', '250');

            var param2 = document.createElement('param');
            param2.setAttribute('name', 'wmode');
            param2.setAttribute('value', 'transparent');

            object.appendChild(param1);
            object.appendChild(embed); // <-- Invalid argument for IE9!!!
            object.appendChild(param2);

            var container = document.getElementById('myDivID');
            while (container.firstChild) { container.removeChild(container.firstChild); }
            container.appendChild(object);
        })();

</script>

However, the swf doesn’t display in IE9 but renders fine in Chrome and FF.

One thing to note is the invalid argument error for IE9 only in the console that I’m getting as called out below in the script.

What am I missing here? I can’t use jquery/swfobject as it has to be plain javascript that I inject into the client page.

  • 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-13T10:22:27+00:00Added an answer on June 13, 2026 at 10:22 am

    Turns out IE sets certain intranet/internet sites to Quirks mode. This causes IE9 to use IE6 javascript behavior and IE7 DOM manipulation.

    Adding the following meta data in the header alleviates this:

    <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    </head>
    

    However, from an api delivery solution the X-UA-Compatible header can be set in the response with value of IE=edge.

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

Sidebar

Related Questions

I have the following Javascript code that works perfectly: $(document).ready(function() { $(#Select1).setDefault(); $(#Select2).setDefault(); $(#Select3).setDefault();
I have the following JavaScript/jQuery code that starts the listener that highlights the DOM
I am trying to be super-concise, and have the following javascript code that listens
I have the following JavaScript code: var x = ['CFMG','JMFMG','CPMAF']; var y = $.param({'test':x});
I have the following JavaScript code: oCoord = {x: null, y: null}; var aStack
I have the following Javascript code. When the page is loaded it is scrolled
I have the following JavaScript code which I like to convert to jQuery but
I have the following Javascript code add_num = { f: function(html, num) { alert(this.page);
I have the following Javascript code (using jQuery): floatUpAndDown(); function floatUpAndDown() { $(#bird).animate({top: '+=30px'},
So I have the following JavaScript code: <script type=text/javascript> function clearRadioButtons() { document.getElementById(radiobutton1).checked=; //etc

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.