tags:

views:

316

answers:

2

So, I have a page (page1.html) and then I have an iframe or object serving up some other page (page2.html) within that page... What I want/need is when the user clicks a link inside the iframe (page2.html) i need a way for page1.html to recognize that the iframe href has changed because the link is loaded into the iframe.

There is no onload event for the object/iframe element so i can't figure out when the user has clicked a link inside the IFRAME (page2.html)...

A: 

You have very little control over what happens in an iFrame. Essentially, once you load it, you have no power over it, and you can't see what happens in it. (You can still tell it to load something else.) If you want that sort of control, you should really be using AJAX, i.e. you should be loading new content into the document object model dynamically.

Danny Roberts
hmm. so if i load it dynamically using Javascript.. i can possibly have control and/or access to the object's data/src when a link is clicked inside that object frame ? when i don't have control over what is in that object frame ????by the way, i'm using an object element instead of iframe
A: 

right click on the link and then click open in a new tab / new window, this will open the webpage in a new tab , then copy the url from the address bar of the browser.

Gaurav