Hi Guys,
I'm not sure if this is the correct place to ask this question.
I'm trying to create a javascript file (.js) that contains the adsense code that should be placed on my static html file. This way, I can reference the same adsense block in all my pages and whenever I decide to change the colors, dimensions .. etc, I will just go there and make my updates.
The javascript file looks like this:
document.writeln('<script type="text/javascript"><!--');
document.writeln('google_ad_client = "
<Adsense ID removed> ";');
document.writeln('google_ad_width = 728;');
document.writeln('google_ad_height = 90;');
document.writeln('google_ad_format = "728x90_as";');
document.writeln('google_ad_type = "text_image";');
document.writeln('google_ad_channel ="7100825086";');
document.writeln('google_color_border = "FFDDDD";');
document.writeln('google_color_bg = "FFDDDD";');
document.writeln('google_color_link = "000000";');
document.writeln('google_color_url = "000000";');
document.writeln('google_color_text = "000000";');
document.writeln('//--></script>');
document.writeln('<script type="text/javascript" src="
http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>');
This works great. The problem happens when I try to surround this code by a table (using script code like document.writeln('<table><tr><td>'); )
when I do that, I found that the table and the ad block are generated as 2 blocks even if the script should be placed inside the table cell (1 block).
Anyone has some ideas?
Moderators, if this is the incorrect place for this question, please feel free to move it ;-)