0

Hi guys,

I'm very new to Javascript and normally I can find solutions for any issues I have with a quick Google search but this one I just can't find a solution that works.

Essentially all I'm trying to do is insert a bit of adsense code into a part of my site.

The site displays totally fine in Firefox, Chrome and Safari but Internet Explorer is causing me a world of problems.

As you can see in the images below IE won't render the page fully and throws up what looks like an iframe with a 400 error in it...

This is the Firefox version, how I want it to look...
[IMG]http://66.7.221.78/~websitee/testwe/includes/firefox.jpg[/IMG]

This is the IE version, with the errors...
[IMG]http://66.7.221.78/~websitee/testwe/includes/ie.jpg[/IMG]

The code I am using is this:

<!--begin header--!>
<table id="header">
<tr>
<td id="header-logo"></td>
<td id="header-ad">
<script type="text/javascript">
<!--
google_ad_client = "pub-5706391847687826";
/* 468x60, created 20/07/09 */
google_ad_slot = "0680301869";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td>
</tr>
</table>
<br><br>
<!--end header--!>

So far I have tried conditional commenting which doesn't work. I have also tried using a simple Javascript code which shows different text for different browsers, this didn't work either.

Also, if I replace the Adsense code with just a simple bit of text, the page renders the same in both browsers (as the Firefox example above).

Any help is very very much appreciated...

Thanks,

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by mdminternet
0

Html comments are <!-- --> and not <!-- --!>.
Try replacing

<!--begin header--!>

with

<!--begin header-->

and so on in the rest of the html code

0

I really don't know whether to laugh or cry after spending hours looking for a fix and it turns out to be the comments!

Thanks a million!

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.