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

Forum statistics

Threads
474,261
Messages
2,571,041
Members
48,769
Latest member
Clifft

Latest Threads

Top