Skip to main content

Bug Tracker

Side navigation

#3479 closed bug (duplicate)

Opened October 13, 2008 08:47PM UTC

Closed January 18, 2009 01:54AM UTC

wrap causing problems in Firefox 2/3 when used with google adsense.

Reported by: tobins Owned by:
Priority: major Milestone: 1.3
Component: core Version: 1.2.6
Keywords: script Cc: tobins, flesler
Blocked by: Blocking:
Description

Take the following example: (NOTE: I've removed my ad client code...)

<div class="rounded">

<script type="text/javascript"><!--

google_ad_client = "pub-*************";

/* 300x250, created 11/13/07 */

google_ad_slot = "4807***801";

google_ad_width = 300;

google_ad_height = 250;

//-->

</script>

<script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script></div>

And apply the following JS:

$("div.rounded").wrap('<div class="roundedcorner"><div class="ml"><div

class="mr"><div class="mm"></div></div></div></div>');

In firefox 2/3 the wrap will cause the google ad code to hide the entire page (page appears blank) and no ad appears. Safari and IE work fine.

Attachments (0)
Change History (4)

Changed October 13, 2008 09:02PM UTC by tobins comment:1

<div class="rounded">
   <script type="text/javascript"><!--
       google_ad_client = "pub-*************";
       /* 300x250, created 11/13/07 */
       google_ad_slot = "4807***801";
       google_ad_width = 300;
       google_ad_height = 250;
    //--></script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>

The JS call:

$("div.rounded").wrap('<div class="roundedcorner"><div class="ml"><div class="mr"><div class="mm"></div></div></div></div>');

Changed October 14, 2008 08:09PM UTC by flesler comment:2

cc: → tobins, flesler
component: unfilledcore
owner: flesler

Changed October 20, 2008 12:04AM UTC by dmethvin comment:3

Google's show_ads.js uses document.write() to put the ad html into the document. What happens when you try to $().wrap() a script that document.write()s html? If the script re-executes it will wipe out the current document. From your description it sounds like that may be happening but I didn't test it.

As for a solution, maybe you could put the ad code in an iframe and round that.

Changed January 18, 2009 01:54AM UTC by dmethvin comment:4

keywords: → script
resolution: → duplicate
status: newclosed

Duplicate of #3105