Controlling the behavior of document loaded inside Iframe

S

shaj

Scenario: Page A has an iframe that loads up Page B. When a link in
Page B is clicked it should open up the new page (Page C) in parent
window, replacing Page A. Normally this could be achieved by adding
target="_top" to the anchor tag in Page B.

Unfortunately in my case, Page B is from an external app that we
cannot edit. I know JS does not allow to access/modify the DOM
elements of the document loaded in Iframe.

Is there a workaround to achieve this?
 
T

Thomas 'PointedEars' Lahn

shaj said:
Scenario: Page A has an iframe that loads up Page B. When a link in
Page B is clicked it should open up the new page (Page C) in parent
window, replacing Page A. Normally this could be achieved by adding
target="_top" to the anchor tag in Page B.

Unfortunately in my case, Page B is from an external app that we
cannot edit. I know JS does not allow to access/modify the DOM
elements of the document loaded in Iframe.

Is there a workaround to achieve this?

You can use a server-side proxying script to rewrite Page B to B2 on the fly
accordingly. Note that copyright applies.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top