If I have a recent comments.js file (coming from another server) is there anyway I can add a TARGET=”_top” to the links that are in the file.js as the file.js is being read and added to the page?
Reason: it is in an iFrame and unless I can add the target top… when you click on a link it will open the new page inside the iFrame. I need it to of course go to the top of the site.
I can’t change the code or add the link targets myself on the original file.js coming from the other server.
It would have to be done as it is being downloaded.
The site is of course PHP
Thanks
Using javascript, you can manipulate the DOM of the iframe after loading is finished and add the target attributes: