Jump to content

Detection Of The Presence And Absence Of Browser Tabbing


iwato
 Share

Recommended Posts

QUESTION ONE: Is it possible for the author of a webpage to dictate to the viewer whether a new page opens in a new tab or window?QUESTION TWO: Is there some way to detect how a viewer opens a hyperlinked page -- in new tab, the same tab, or a different window?BACKGROUND: I have designed my pages in a way that distinguishes between pages contained within the same domain and those that are not. As a result of this design, I want to be able to force my users to open hyperlinked pages that are not in my domain in either a new window or new tab. Within the industry new tabs are generally preferred over new windows.Roddy

Link to comment
Share on other sites

Generally, window.open() (Javascript) and the target attribute automatically open windows in new tabs rather than new windows. The only way to open a new window is to use window.open and assign a width and height to the resulting window.You can't tell if the new window is a real window or just a tab, but with Javascript you can check if window.opener exists or not. window.opener will tell you if a window has been opened from another window or not.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...