Forum Moderators: open
I have a website designed with the menu links pointing to an iframe. The links are images and if a user right clicks the link to open in a new window, it only opens the content of the iframe. I am wondering if there is a code that when a user right clicks and opens in a new window, the actual index.html opens instead of the iframe content page.
Example:
a href="links.html" target="main"
If the user clicks that it opens like it should in the main iframe window
if they right click it and open in new window, it opens links.html which is the content to appear in the main frame and i dont want users to be able to open that page by itself, i'd rather the window open the index.html
I hate to be a bother but,is there a simple solution to this?
edit: sorry, friday brain not working, that's for breaking a page out of frames altogether..
Force Many Pages Into Frames [webmasterworld.com] - Message #21
What I need is for when a user right clicks on a link to open in a new window, I need that new window to open as the index.html rather than the page for the link that they are right clicking on. I'm sorry, I hope that didnt confuse you.
If you just want to load the index.html page (but this would be a disservice to user, imo) then you could use a much simplified javascript -- just this:
if (top.location == self.location)
top.location.href="index.html"