Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html - how do I make a page load in a new tab in IE8?

What combination of html and IE8 settings get IE8 to open links in a new tab. Or can you not do this with IE8, and you only get the new tabs by manually selecting File-> new/duplicate tab?

My website works in Firefox - pages on the site load in the current tab, and links off site load a new tab. IE8 won't behave: target="_blank" opens a whole new window; the other options, _self _top _parent, all open the page in the current tab.

I have Firefox set to "Open new windows in a new tab." The links to pages on my site all have target="_self" and Firefox keeps these in the current tab. On the external links I don't have a target set (I added _blank to see if it fixed IE8, and doing that didn't affect Firefox).

I can't find an equivalent setting in IE8. Tools-Internet Options-General-Tabs/Settings has an enable tabs box, and a sub-option to automatically switch to newly opened tabs. Is there some html that will work? An IE8 setting I'm missing?

Any help appreciated.

like image 724
Rilien Avatar asked Jan 20 '26 10:01

Rilien


2 Answers

It is not a thing you can control from HTML code, as it should be user's, not document author's decision how to open a link.

To open pop-up windows in new tab, follow instructions from IE8 help:

To change how pop-ups are displayed

In Internet Explorer, click the Tools button, and then click Internet Options. Click the General tab, and then, in the Tabs section, click Settings. Make a selection in the When a pop-up is encountered section. Click OK twice.

Updated: Reading OPs comments to other posts, it seems like the intent is to make all external links open in new tabs. However, it is not document author's choice how the client should open any link in any page - it has to be decided by the client. Moreover, even though you can create a client-side script which sets "target" property to open pop-up windows, there is no notion of "tab" in Document Object Model and hence you cannot do it even in a script.

like image 83
naivists Avatar answered Jan 22 '26 04:01

naivists


The answer to the question was posted in the comments (but is now deleted). Now you can test it in IE8 - just use the middle mouse button to open the link in a new tab. Firefox does work better with tabs.

like image 34
elmer Avatar answered Jan 22 '26 03:01

elmer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!