Click here to Skip to main content
15,747,766 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a website that was one of the first that i had ever done (with line by line of code), and for navigation had decided to use iframes (don't ask why).

I have two iframes on a page. One for navigation, and one for viewing content. When someone clicks a link in the navigation tab, it uses
<a href="somepage.html" target="main">Link</a>
whereas "main" is the name of the iframe

I developed it on a Macbook and tested it in safari, while it was being uploaded to Google drive for hosting.

While testing in safari, the navigation seemed to work fine. However, when i tested it in Firefox, Chrome, Opera, and Internet Explorer, the links open in a new tab, not a new page.

I have tried the javasript alternative of using
<a href="java<!-- no -->script: frames['main'].location.href();">Link</a>

but only to get the same result.

What can I do to solve this?
Sergey Alexandrovich Kryukov 2-Mar-15 17:39pm    
All right, then why no asking why? :-)
And I don't think the alternative between a new tab and new separate browser window is covered by the standards. Right approach is to leave to the user decide what goes in what windows.
Who told you that you have to solve this? Wouldn't it be better to think at the humane UI design instead?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900