new-window

IE history push state

半城伤御伤魂 提交于 2019-12-01 05:46:32
I have a webpage where the user has the possibility to display the terms and conditions without reloading the page, via AJAX. That, in itself, is no problem, however, I am also trying to push a history state. That works fine in most browsers, except in IE. For some inexplicable reason, there, the content is loaded via AJAX, but also, a new tab is opened with the previous page. How can I fix this? You can see the example on this webpage ( http://galaxy-battle.de ), try clicking on "T&Cs" in the "Join"-box. Sergei Grebnov IE9 and below doesn't support pushState . You have an exception when

IE history push state

笑着哭i 提交于 2019-12-01 03:15:55
问题 I have a webpage where the user has the possibility to display the terms and conditions without reloading the page, via AJAX. That, in itself, is no problem, however, I am also trying to push a history state. That works fine in most browsers, except in IE. For some inexplicable reason, there, the content is loaded via AJAX, but also, a new tab is opened with the previous page. How can I fix this? You can see the example on this webpage ( http://galaxy-battle.de ), try clicking on "T&Cs" in

Ways to detect CTRL-N or when a user opens a new window

百般思念 提交于 2019-11-30 10:01:49
问题 How can we detect when a user opens a new window. The user is already authenticated and we make heavy use of sessions. We were trying to avoid Ctrl + N javascript hooks but maybe that is an option. I am assuming the request is the exact same URL...with Ctrl + N ? 回答1: We were trying to avoid ctrl-n javascript hooks Forget it. Whilst you could in theory try to catch keypress events for ‘n’ with the Control key modifier, there are any number of other ways to open a new window or tab which may

Opening a new Window with a Widget in GWT

对着背影说爱祢 提交于 2019-11-29 20:14:45
问题 Before you start shooting me down i have checked for answers and i have googled till my fingers bled but i havent been able to find a simple, concise answer. So im asking again for all those that might have this problem. Question: how to open a new window with a formpanel in side. Context: i have an app that lists lots of items, i want someone to edit an entry, i want a new window to open so they can edit properties then hit save. A standard thing you find in a lot of applications.

Ways to detect CTRL-N or when a user opens a new window

て烟熏妆下的殇ゞ 提交于 2019-11-29 18:15:24
How can we detect when a user opens a new window. The user is already authenticated and we make heavy use of sessions. We were trying to avoid Ctrl + N javascript hooks but maybe that is an option. I am assuming the request is the exact same URL...with Ctrl + N ? We were trying to avoid ctrl-n javascript hooks Forget it. Whilst you could in theory try to catch keypress events for ‘n’ with the Control key modifier, there are any number of other ways to open a new window or tab which may be more likely to be used, and you won't be able to catch. File->New Window/Tab, middle click or shift-click

How to use target=“_blank” to open report in new window only if validation has not failed

老子叫甜甜 提交于 2019-11-29 07:30:56
I have a report that needs to be opened in another tab, but only if the validation hasn't failed. In my case, the validation fails and the same page opens in another tab with the validations errors. Luiggi has answered the POST matter. If the report is however available by a GET request, then there are other ways. Use window.open() in oncomplete . <h:form> ... <p:commandButton action="#{bean.submit}" update="@form" oncomplete="if (args && !args.validationFailed) window.open('reportURL')" /> </h:form> Or conditionally render a <h:outputScript> with window.open() . <h:form> ... <p:commandButton

Opening new window/tab without using `window.open` or `window.location.href`

最后都变了- 提交于 2019-11-28 12:55:34
I want to generate a link that is clicked right after creating, but nothing happens Code: var link = $("<a></a>"); link.attr("href", "/dostuff.php"); link.attr("target", "_blank"); link.click(); The attributes are set correctly: var link = $("<a></a>"); link.attr("href", "/dostuff.php"); link.attr("target", "_blank"); var linkcheck = link.wrap('<p>').parent().html(); console.log(linkcheck); This returns: <a href="/dostuff.php" target="_blank"></a> No errors UPDATE I tried to append it, bind click to it, click it and remove it var link = $("<a></a>"); link.attr( { id : "linky", href : "/dostuff

Refresh/navigate current page while opening/downloading file in new tab/window

混江龙づ霸主 提交于 2019-11-27 16:17:24
I have a button which opens a new tab with a generated pdf-file. However, after I click on the button, I want to navigate to another page. That means, after clicking on the button i want to open a new tab with the pdf and navigate to another page on the initial tab. I am using primefaces p:commandButton and tried with onclick="window.location.href='www.google.de'" but it does not work. However onclick="window.lalert('www.google.de')" does work. This is my code: <h:form id="transForm" target="_blank"> <p:commandButton value="Zertifikat erstellen" ajax="false" label="Speichert die Anmeldung und

Open new window by POST using h:commandButton

旧时模样 提交于 2019-11-27 14:26:46
I need to open a JSF page in a new window by POST on click of a <h:commandButton> . I know I can acheive this using the JavaScript. But I would like to achive this using JSF and not JavaScript. How can I achieve this? I'm using JSF 2.0. The only non-JS way is to set target="_blank" in the parent <h:form> . <h:form target="_blank"> ... <h:commandButton value="Open in new Window" /> </h:form> This however affects all non-ajax(!) actions which are performed in the very same form. So if you're smart, make the action which shouldn't open in a new window an ajax action. However, ajax is also

System.Windows.Forms.WebBrowser open links in same window or new window with same session

耗尽温柔 提交于 2019-11-27 13:43:12
When using the .NET WebBrowser control how do you open a link in a new window using the the same session (ie.. do not start a new ASP.NET session on the server), or how do you capture the new window event to open the URL in the same WebBrowser control? I just spent an hour looking for the answer, so I though I would post the results here. You can use the SHDocVwCtl.WebBrowser_V1 object to capture the NewWindow event. NOTE: Code from http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_21484555.html#discussion //-------------------------------VB.NET Version:---------------------