Skip to main content

Bug Tracker

Side navigation

#2647 closed bug (duplicate)

Opened April 03, 2008 02:41PM UTC

Closed December 19, 2008 04:08AM UTC

Moving object containing Javascript

Reported by: dunnma Owned by:
Priority: minor Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:
Description

I have an ad tag that generates an ad via doubleclick. This piece of code is put into a hidden div.

I then use jQuery to move the contents of the hidden div and position it into an article. This itself works fine. The "bug" is that when jQuery is moving the code...it is executing the html as well (contains document.write()) and it is placing additional ads on the page (where the actual jQuery function is).

When moving objects around on the page, jQuery should not be "executing" them.

To replicate just throw 5-10 paragraph tags on your page and

then place this code at the bottom.

Code:

<div id="article_ad" style="display:none">

<div style="float:left;display:inline;padding:0px 5px 5px 5px;margin:

5px 5px 5px -5px;text-align:center;border:1px solid #999">

advertisement<br />

<SCRIPT LANGUAGE="JavaScript">

document.write('<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://

ad.doubleclick.net/adj/kansascity.inkkc/inkkc;template=cobrand;!

category=inkkc;pos=right2;sz=160x600;tile=25;ord=25?" ><\\/SCRIPT>');

</SCRIPT>

</div>

</div>

<script type="text/javascript">

$("p:eq(3)").append($('#article_ad').html());

</script>

Attachments (0)
Change History (1)

Changed December 19, 2008 04:08AM UTC by dmethvin comment:1

resolution: → duplicate
status: newclosed

This is a duplicate of #3105; further discussion is on that ticket.