Jump to content

Dynamically created div - ad displayed only once


ianwalberg

Recommended Posts

Does anyone have an example of a dynamically created div with the invocation code added?

We creating the div's when a user clicks on an item which popup and then are populated based on what was clicked, this uses jquery.

I believe that when the div is added by jquery it is added as text so the <script> tags not run, they are in the dom but do not run.

So we changed to adding the <ins> tag and then running the asyncjs.php or ajs.php using jquery getscript and/or running the js that they return.

This works and the advert is correctly displayed.

However we cannot get the ad to display more than once.

What are we missing?

Many thanks

 

Link to comment
Share on other sites

  • 2 weeks later...

Splitting the JS returned by the async.php into a separate file and using JQuery getScript to load and run it shows that after the first time this returns true so then the rest of the JS does not run.

if (!c.reviveAsync.hasOwnProperty(a))

What is this checking for?

Thanks

 

Link to comment
Share on other sites

  • 3 weeks later...

I got a similar problem. Is there a way to trigger ad loading for ads with <ins> tags although page loading is already finished?

I already tried to execute revive.apply(revive.detect()) after inserting the new ad, but this seems to cause problems in case the initial ajax call sent from the revive async script did not yet finish.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...