Hi to all, I'm developing a web page and the requirements is that the page must include an iframe and the user can insert an URL address and the page will be displayed in the iframe(I write awhile a question displaying contents ion iframe and I receive an answer the I should write my own pages), this is the requirement I receive so I have to do it this way.
My Problems:
1. There are pages the run a code like:
top.MyFunctio();
Because now the top is one of my pages and in the page doesn't exist the "MyFunction" method I receive javascript errors, I was wandering if there is way to catch all the errors they come from the iframe?
2. I have a page that has an iframe and it shows a page in it. Now, I am having trouble stop users such that if they click on a link that will force to take over the entire IE, I loose my webpage completely.
For e.g. Iframe pointing to "www.yahoo.com", if you click on any link on the iframe that is displaying yahoo.com, you will see that the entire page will now be directed to yahoo.com and I have lost my page.
Is there a way this can be done. What I want is that the user should be able to navigate to any page they want under yahoo, but they all should still be displayed in that iframe.
Any help will be highly appreciated
I noticed that some pages are using the following code:
page=self.location.href;
if(page!=top.location.href)
top.location.href=page;