0
votes

I have a popup iframe content, the source(src) of iframe is a html response generated from a another server. The content includes links, and text. The anchor tag does not have any target attribute, so when we click the link it opens in the same iframe. I need to add target="_parent" to the anchor, using javascript.so that it can be loaded in the parent page.

Is there any way we can alter the anchor attribute using javascript.

1
Imagine being able to load Google in an iframe and then modifying the search button so that is loads results from Bing... - James Hill
@JamesHill we all dream of the reverse !!! - Manse
@ManseUK, you're telling me! I had to Google search engines other than Google to find one for my example ;) - James Hill

1 Answers

2
votes

For security reasons, it is completely impossible to interact with content from another domain (unless it cooperates).

You need to modify the other code.