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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:43:14+00:00 2026-05-24T05:43:14+00:00

I have code which works for every browser except IE (surprise, surprise). This is

  • 0

I have code which works for every browser except IE (surprise, surprise).

This is tricky stuff though. We had a coldfusion custom tag which generates advertisement code in the body of the document. But, for page load speed reasons, we decided to try and load the code returned from the custom tag using jQuery after the document was ready.

We’ve tried nearly every possible method, each with its own hassles. Finally settled on calling the custom tag in a hidden div at the bottom of the page initially, then using jQuery to get the specific portion of the code we needed and loading it into its final resting place further up the page.

We have five ads altogether. One of them returns code that IE can’t work with. The rest all work fine.

The four OK ads return a hyperlink string from the custom tag (e.g. as follows), which is easy to work with and works in all browsers:

<a href="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=brd&amp;FlightID=2997227&amp;Page=&amp;PluID=0&amp;Pos=9088" 
   target="_blank">
    <img src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=bsr&amp;FlightID=2997227&amp;Page=&amp;PluID=0&amp;Pos=9088" 
         border="0" 
         width="300" 
         height="250">
</a>

We use the following code to load into temp div (divx), then extract and reload into final position (left2):

$('#divx').html("").load('/remoteAd.cfm?type=left2&referrer=/index.cfm', 
    function(g){
        var xx = $('#divx').html());
        $('#left2').html(xx);
});

HOWEVER, the troublesome one returned a huge block of code that broke javascript when we tried to assign it to a variable (I can’t even load it here without it breaking. You can view it in the source code of this page), so we decided to extract it using .text():

var xx = $('#divx').text();

instead of

var xx = $('#divx').html();

This extracts the following js STRING (complete with line breaks) in ALL BROWSERS EXCEPT IE:

ajaxinclude("/remoteAd.cfm?type=right1&referrer=/index.cfm");

function ebStdBanner1_DoFSCommand(command,args){
   try{
        command = command.replace(/FSCommand:/ig,"");
        if((command.toLowerCase() == "ebinteraction") ||   
           (command.toLowerCase()=="ebclickthrough")) 
            gEbStdBanners[1].handleInteraction(args);
        else if(command.toLowerCase()=="ebversiontrackingimpression")
            gEbStdBanners[1].ebversiontrackingimpression(args);
   } catch(e) {}
} 
function ebIsFlashExtInterfaceExist(){
    return true;
}

<a href="http://bs.sys.com/adServer.bs?cn=brd&FlightID=2997227&Page=&PluID=0&Pos=9088" 
   target="_blank">
    <img src="http://bs.serving-sys.com/BurstingPipe/adServer.bs?cn=bsr&FlightID=2997227&Page=&PluID=0&Pos=9088" 
         border=0 
         width=300 
         height=250>
</a>

It’s a simple matter to extract the hyperlink block from the string, thanks to suggestions from others on stackoverflow.

HOWEVER, in IE9, I get a blank result for alert($('#divx').text());
Can anyone tell me WHY?. It’s ruining my day.

You can view the code that loads into the temp div by viewing the source code of this page. All I want to do is access this as text() and isolate the <a>...</a> block from it before loading that into its final div.

  • 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-05-24T05:43:15+00:00Added an answer on May 24, 2026 at 5:43 am

    What browser/document mode are you in? I think I get correct data in Browser Mode: IE9 and Document Mode: IE9 standards. Switching document mode to anything other than IE9 standards returns empty .text() data.

    Including the additional information regarding this for future visitors:

    Here’s additional info:

    http://blogs.msdn.com/b/ie/archive/2010/10/19/testing-sites-with-browser-mode-vs-doc-mode.aspx

    and to force IE9 into standards mode: http://msdn.microsoft.com/en-us/library/cc288325(VS.85).aspx

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

Sidebar

Related Questions

I have the following code, which works perfectly fine in every browser except for
I have this code which compiles and works as expected: class Right {}; class
I have the following code which works just fine when the method is POST,
I have the following code which works fine. However, I only want to return
I have the following code which works perfectly, but I want to allow access
I have some code here which works perfectly in firefox but not in chrome
I have the following code which works when i put it in any blank
At the moment I have the following code which works fine. label = new
I have the following PHP code which works out the possible combinations from a
So far i have got the code below which works lovely when trying an

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.