SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    USA
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Javascript works in Firefox, but not in IE

    Usually it's the other way (IE works, Firefox not working)... but here it is. IE does render something, although it puts the advert script (starting on line 9) at the very end, after the close of the last table. Firefox displays it as I have intended it (Ad inside the table).


    Code:
    if (screen.availWidth>800) {
    document.write("<iframe src='sidebar_dark.htm' width='170' height='1075' scrolling=no frameborder=0></iframe><br>");
    document.write("<table cellpadding='0' cellspacing='0' border='0' class='tborder' width='170' align='center'>");
    document.write("<tr>");
    document.write("<td calign='center'>");
    document.write("<table cellpadding='4' cellspacing='1' border='0' width='100%'>");
    document.write("<tr align='center'><td class='thead'><span class='bigyel'>Sponsor Links</span></td></tr>");
    document.write("<tr><td class='smallfont' bgcolor='#3B3B3B'>");
    document.write("<scr"+"ipt language='JavaScript'");
    document.write("src='http://4.adbrite.com/mb/text_group.php?sid=XXXXXX'>");
    document.write("</scr"+"ipt>");
    document.write("<p />");
    document.write("<div><a class='adHeadline' target='_blank' href='http://www.adbrite.com/mb/commerce/purchase_form.php?opid=XXXXX'>Place Your Ad Here</a></div>");
    document.write("</td></tr></table></td></tr></table>");
    }
    else;
    I am pretty new to JavaScript and all in all not so good with code, so I appreciate any advice you guys have!

  2. #2
    SitePoint Enthusiast
    Join Date
    Nov 2004
    Location
    USA
    Posts
    40
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    OK, i have an update. No matter WHERE I put the embedded javascript, it ALWAYS shows at the very end with IE, as if IE renders the whole framework first, then renders the adbrite ad.

    With Firefox, moving the adbrite ad section moves where it's rendered in the final version.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •