I am running a legacy app in MS edge in IE mode. Pages on web app can open a pop up in new window (but this on edge and not IE mode) using window.open.
When pop up is launched, this pop up redirects to another url on same pop up window.
now window.close is throwing some error and not closing the pop up. Is it due to Ms edge IE mode to Edge pop issue?
I have not catched the exception but the exception is coming.
It's impossible to get the Edge window handler in IE browser, so it's impossible to get documentWindow to close the window.
As you can't use the two windows in the same browser kernel, the only workaround I think is using window.self.close() to close the pop up window by itself.
Related
I need a way of programmatically triggering either bringing the browser window to front or at least the window flickering. I have noticed that window.alert does it in firefox but it doesn't in chrome. Opening a new tab (window.open)causes flickering in Chrome but it's not a solution - it would be if I could close the "old tab"
Is there something like "visually notify user" working at least for current versions of firefox, chrome and edge?
I'm trying to figure out how I could use window.open to open a window in Chrome without having this window displayed on top of the active window.
I'm using this:
_Top.window.open(myURL,myWindowID,'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,alwaysLowered=yes,z-lock="yes",resizable=1,top=800,left='+pxLeft+',width='+myWidth+',height='+myHeight);
I'm trying with alwaysLowered, z-lock, ... but when used on Chrome, the new windows comes on top of the active window. It works in Firefox and IE but not on Chrome.
I also use:
_Top.window.blur();
Is there a parameter to achieve this or should I use something else for Chrome?
Thanks
Laurent
On iPad Safari, there seems to be issue with popup. When a popup (opened using window.open()) is closed, it remains in minimized mode (or grid view) after closing the popup...It
does not return focus to the parent window.
I have tried using parent.opener.focus(), but still does not work.
Is this a known iPad issue OR can we fix this issue using some JS code?
Please help.
I'm not sure if this would help, but just some personal experience on this issue:
Did you try going to iPad's Setting - Safari - Block Pop-ups? Try turning off Block Pop-ups, it should work.
If it still doesn't appear, try turning on the Debug Console for the ipad and check if any error appears during the popup event.
Try using a URL for window.open to be a local / same domain url address. I think that works (without needing to turn off the popup blocker in safari ipad).
I want a script that makes a user's Internet Explorer open a new tab instead of a new window whenever someone clicks on a (target="_blank") link/banner on my webpage.
I hate how Internet Explorer defaults to opening new windows instead of new tabs when a link/banner is clicked. All the other popular browsers (e.g. Chrome, Opera, Firefox) open tabs by default.
Preferably this script would need to work in all versions of IE that support tabs.
So... How to, using JavaScript force IE into opening new tab instead of window, which is it's default behaviour?
This isn't possible; it's a browser setting/behavior which is not callable from a script loaded on the page.
Programmatically open new pages on Tabs
In IE11 at least, the default user setting is to 'Let Internet Explorer decide how popups should open' (Off-hand, I'm not sure what the default was in previous versions). Some context around the IE behaviour with this default setting can be found here: https://superuser.com/questions/713743/what-rules-apply-when-ie9-decides-how-to-open-popups
Per others' answers/comments here, generally speaking, we as web programmers have little control over how popups are opened. However, provided users have not changed their default selection (in IE11 at least!), you can approximate the behaviour you want through appropriate invocation of the window.open() method. Specifically, if you pass less than three arguments to the method, IE will generally open a new tab, while passing the specs (third) argument (even if with a null or undefined value <- this caught me out initially!) results in IE popping a separate window.
If you're happy to live with a solution that isn't guaranteed but works a fair amount of the time, this may help. The 'tyranny of the default' works in our favour in this instance at least!
Chrome at least is not quite so picky about the specs argument - if null or undefined, it will pop the tab instead of the window under default configuration.
What I did was to go to the tab settings of IE and under the section 'When a pop-up is encountered' select 'Always open pop-ups in a new tab'. I hope this helps.
To navigate to this menu open IE settings (Cog icon at the top-right, Internet Options) and click the tabs button under the Tabs section.
The below post show you how to navigate to the menu in the screenshot.
https://superuser.com/questions/507798/prevent-a-single-ie-window-with-multiple-open-tabs-from-being-displayed-as-multi
IE Settings
Response To:
Opening Popup Window is not working in firefox and google chrome
Hi,I have similar code in above question.My code works fine in IE.
this.parent.window.showModalDialog('Counter.aspx', '',
'dialogHeight:170px;dialogWidth:150px;status:no;scroll:no;edge:sunken;toolbar:0;center:on;help:off;unadorned:yes;');
What can i do about this code in order to open this window in Google Chrome browser ?
Thanks for any assistance
Myra
showModalDialog works in chrome(its not truly modal though). the problem could be that it is blocking them. Chrome's minimalistic design doesnt even tell you that some times. try adding an exception for you current website.
you can find it under -
Options->Under The Hood Tab-> Content Settings Button -> Popups Tab -> Exceptions button