- TLC Home Home
- Discussions Discussions
- Documentation Documentation
- Knowledge Base Knowledge Base
- Education Education
- Blog Blog
- Support Desk Support Desk
11-14-2017 05:30 AM
Hi
I'm trying to track an event based on visibility of an elemen inside a iframe.
there is no jquerry on the site. so far i've tried a couple of differet aproaches.
And this is the one thats closest to working.
poll = window.setInterval(function() { var current_style = window.frames[0].document.getElementById("nyhetsbrevSuccess").style.display; if (current_style != "none") { window.clearInterval(poll); console.log("test"); utag.link( { "success" : "test" } ); } else { previous_style = current_style; } }, 500);
the code workes fine and prints "test" to the console once when the element changes style from "none". But the utag.link goes berserk and sends as many calls it can, as fast as it can.
Any of you guys know how i could do this?
Solved! Go to Solution.
11-14-2017 06:04 AM
11-14-2017 06:11 AM
Great job at figuring out the problem @Bknapstad!
Copyright All Rights Reserved © 2008-2023