Trommsdorff
Aug 11th 2006, 10:39 am
Hi all,
Usually I can get a script working in IE and then fix it for firefox, but now i have the opposite problem - it works fine in Firefox but not IE!
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).
No matter where I put the embedded advert script in the following code, it ALWAYS is shown at the end in IE. With firefox, it moves around as could be expected.
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!
Usually I can get a script working in IE and then fix it for firefox, but now i have the opposite problem - it works fine in Firefox but not IE!
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).
No matter where I put the embedded advert script in the following code, it ALWAYS is shown at the end in IE. With firefox, it moves around as could be expected.
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!