PDA

View Full Version : Google Adsense, and similar codes


saifai
08-04-2006, 03:45 AM
Since I've converted to XHTML for my site, I haven't been able to get Google Adsense codes to work right. There are some Javascript codes I was able to find a work-around solution, but this is one I'm stuck on.

Amazon is now using a similar code for their Omakase links:
<script type="text/javascript"><!--
amazon_ad_tag = "amazon_id"; amazon_ad_width = "468"; amazon_ad_height = "60"; amazon_ad_link_target = "new";//--></script>
<script type="text/javascript" src="http://www.assoc-amazon.com/s/ads.js"></script>

What seems to be setting it off is descriptive definitions that are within...
<!-- code -->

Is there any way to make those codes work? Using CDDATA just makes it look like text, and pasting the code straight over makes it invisible.

Alex Vincent
08-04-2006, 06:48 AM
<![CDATA[ code ]]>

Maybe?

If that doesn't work, go fire off an e-mail to Google. Really. They should know better than to put stuff like that in comments.

saifai
08-04-2006, 07:02 AM
That one didn't quite work either. It worked the same as if I'd pasted the code in straight over (i.e. it just made it invisible).

Back to the drawing board. Thanks for trying!

felgall
08-04-2006, 08:21 AM
Well you really ought to be using external javascripts where the Javascript is in a separate file that is referenced from the page instead of being coded in it.