ianwalberg Posted May 15, 2016 Report Posted May 15, 2016 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 Quote
ianwalberg Posted May 26, 2016 Author Report Posted May 26, 2016 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 Quote
Matteo Beccati Posted May 26, 2016 Report Posted May 26, 2016 @ianwalberg You can donwload the non-minified code here: https://github.com/revive-adserver/revive-adserver/blob/master/www/delivery_dev/async.js The snippet you refer to is meant to avoid running the async initialization more than once for each Revive instance. Quote
r3vile Posted June 16, 2016 Report Posted June 16, 2016 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. Quote
Matteo Beccati Posted June 16, 2016 Report Posted June 16, 2016 I believe "retriggering" async would be a perfect feature request over on our github ;) Quote
r3vile Posted June 20, 2016 Report Posted June 20, 2016 On 6/16/2016 at 5:17 PM, Matteo Beccati said: I believe "retriggering" async would be a perfect feature request over on our github ;) https://github.com/revive-adserver/revive-adserver/issues/725 ;) Quote
Recommended Posts
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.