Forum Moderators: open
and the content in this js file ggad.js is:
---------------------------------------------------------------------------?-------------------------
document.writeln("<div><script type=\"text/javascript\"><!--");
document.writeln("google_ad_client = \"pub-000000000000\";");
document.writeln("google_alternate_color = \"FFFFFF\";");
document.writeln("google_ad_width = 336;");
document.writeln("google_ad_height = 280;");
document.writeln("google_ad_format = \"336x280_as\";");
document.writeln("google_ad_type = \"text_image\";");
document.writeln("//2007-09-02: Body336");
document.writeln("google_ad_channel = \"1646757067\";");
document.writeln("google_color_border = \"FFFFFF\";");
document.writeln("google_color_bg = \"FFFFFF\";");
document.writeln("google_color_link = [\"2D8930\",\"3D81EE\",
\"C94093\",\"1F3A87\"];");
document.writeln("google_color_text = \"000000\";");
document.writeln("google_color_url = \"666666\";");
document.writeln("//-->");
document.writeln("</script\>");
document.writeln("<script type=\"text/javascript\"");
document.writeln(" src=\"http://pagead2.googlesyndication.com/pagead/
show_ads.js\">");
document.writeln("</script\></div>");
document.writeln("<div><a href=\"http://sample.org/\" target=\"_blank
\"><U>This is my own text link!</U></a></div>");
---------------------------------------------------------------------------?-------------------------
the display i expected should be like this:
------------------
google adsense
This is my own text link!
------------------
i.e. google adsense display on the top of my own text links.
and the html shows the above result before I convert it to js.
but the actual display with this js file is like this:
------------------
This is my own text link!
google adsense
------------------
the google adsense display itself underneath my own links.
I also tried to use table to fix the postion other than div ,I put adsense and my own links into diffrent td, but also failed.
Note: this wrong display only shows in IE, all right in Firefox and Opera.
I really can't understand why the location changes with the same code when they are converted to js. (the html shows the right postions)
really appreciate your kind help!
thanks a million!
Just a couple of points... you don't need to writeln all the google variable assignments, these can be left in your ggad.js file as straight forward JS and they will be picked up.
If you used single quotes to delimit your JS strings, then you wouldn't need to escape all the double quotes used for the HTML attributes.
Do you need to include the backslash (escape) in your closing script tags?
document.writeln("</script\></div>");
As to why your content is the wrong way round in IE I'm not sure. Do you have any CSS styling? Does the google code do something particular in IE?