I have links that are dynamically generated, and I need to set a goal for all of them. How can I do this using javaScript. I found something similar to jQuery working ..
$("a").attr('target', '_top');
but I don’t want to use the library for this, and I guess a couple lines of javaScript will take care of this ... I just don’t know how to write this.
To clarify what I'm doing, the links are generated using javaScript and the recommendation engine, ATG, and I call this in an iframe, which I need to break to the top. I assume that I just need a way to define all the links in the DOM, it does not have to be bound to a specific identifier. Is it possible to associate a dynamically generated attribute with a dynamically generated link? There is the possibility of creating custom rendering, but I hope to avoid this route.
source
share