Dear Team,

Im migrating my application from ie8 to ie11. The below code opens a new window in ie 8 as expected but in ie 11 it opens a new tab.

I checked in microsoft website, they told to change internet pop up settings.
But i need to make some changes in code itself so that it creates new window instead of new tab.
Is there a method/code available to force the ie11 to open new window instead of new tab.

Please advice.

Below is the code which opens new window in ie 8 and new tab in ie11.

window.open("<%=CfSPBPropertyWrapper.getInstance().getProperty("cfLink")%>?actionName=SP_ACON_LD_CAC_QUEUE&viewName=spbill_f_clc_que&SPB_HIDDEN_APPLICATION_ID=2&SPB_INPUT_NUMBER="+No);

<a class="iotext"  name="Number" href="#" onclick="javascript:loadPage('<%=item.getWITypeID()%>','<%=item.getNumber()%>');" ><%=Utility.nullToString(item.Number())%></a>

Dani AI

Generated

Short answer: IE11’s behavior here is controlled by the browser (the tab/pop‑up settings), not by the page. The user’s Internet Options -> General -> Tabs -> Settings choice determines whether a pop-up opens as a tab or a separate window, and when the setting is “Let Internet Explorer decide” the browser will open a separate window only if the popup requests size/display features. This means you cannot absolutely force every client to open a new window from page-side code. (searchtempest.com)

Practical: if changing the users’ settings is not an option, request a real window (not just a blank target) by supplying the third argument (window features) to window.open. In many IE configurations a window.open call that specifies width/height or other features will produce a separate window instead of a tab. Example (replace URL and sizes as needed):

// ask IE to create a popup window (many IE installs will open a window when features are present)
window.open('https://example.com/path','_blank','width=900,height=700,resizable=yes,scrollbars=yes,menubar=yes');

This is only a best-effort approach; it’s not guaranteed across all machines or enterprise policies. Enterprise admins can lock tab/pop-up behavior via Group Policy or registry keys (so some users can never be forced to open a new window), and legacy IE-only tricks like showModalDialog are obsolete and not a cross‑browser solution. If consistent behavior is required, prefer an in‑page modal (Bootstrap/jQuery UI/HTML <dialog>) or a server-driven workflow that doesn’t rely on pop-up windows. (windows-security.org)

Notes for : follow ’s original point — first confirm the target machines’ Tab settings (gear → Internet Options → General → Tabs → Settings) and test the window.open(..., features) approach as a pragmatic workaround. (robert365.com)

open new tab or open new window is set in the user's Internet Options
the web page has no control of it
attempting to take control of any user's pc will be seen as malware,
with the appropriate action being taken by anti-malware programs,
blogs, et all. not a good result for you, without any malicious intent.

the only possible reason you see a different result in IE8,
is
you have different Internet Options applied in the machine running IE8

I have win98 print kiosk IE6, the code opens new window ie6 has no tabs
I have winxp laptop, the code opens new tab
I have win7 laptop, the code opens new tab
I have win2000 server, the code opens new tab
I have win81 desktop, the code opens new tab

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.