new-window

Pass value to Child window using Javascript

点点圈 提交于 2019-12-24 19:39:18
问题 I'm attempting to get the question id from the parent page and pass it into my new child page. When the child window gets a response it will put this data into text_body id . I have managed to create the question id and open a new window. However, I get an error when passing the value to text-body id . Cannot set property 'value' of null. I think the problem happened because the JavaScript still detect the previous page, and can't focus into the new window. I have included my source code

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

吃可爱长大的小学妹 提交于 2019-12-18 05:04:35
问题 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. 回答1: 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')"

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

末鹿安然 提交于 2019-12-17 20:28:47
问题 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

Open new window by POST using h:commandButton

馋奶兔 提交于 2019-12-17 07:33:17
问题 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. 回答1: 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

Pass information to new web-browser window/tab being opened with BrowserWindowOpener in Vaadin 8

不羁岁月 提交于 2019-12-13 04:33:19
问题 In Vaadin 8, we can let the user open a new tab/window within their web browser by clicking a button that has been associated with a BrowserWindowOpener. As discussed in the manual, a new UI is instantiated on our behalf. All we pass is a .class object, the class of our UI subclass to be instantiated for display in the new window/tab. For example: BrowserWindowOpener opener = new BrowserWindowOpener( PersonDetailUI.class ); That works for me. My question is: How do I pass some information to

Passing a JavaScript function to run in a new window object

梦想与她 提交于 2019-12-12 04:25:19
问题 Let's say I have a HTML string that gets passed to a new window/browser using the following method: var htmlStr = "<div><button id='copy-all'>Copy all contents</button></div>" + "<div id='contents-container'>" + " (lots of contents are placed here...) " + "</div>" , newWin = window.open("", "Test", "width=1000, height=800, scrollbars=1, resizable=1") , doc = newWin.document; doc.write(htmlStr); As you can see, there will be a button ( #copy-all ) along with all the contents once the HTML

WPF WebBrowser: How I do access progress and new window events

房东的猫 提交于 2019-12-08 05:04:37
问题 I'm building an a WPF app that uses the WebBrowser control. I'm struggling on a couple of points: How to get the current progress of a download from the control. The WinForms WebBrowser control raises ProgressChange events - how can I replicate this feature with the WPF variant? How to capture links that are trying to open in a new window. Again the Winforms WebBrowser had a NewWindow event. I could use this to stop IE being started and to open the link in the same window. Is it possible to

replacing a popup window URL with the same URL

好久不见. 提交于 2019-12-04 06:02:17
问题 I am needing to replace a myWindow=window.open popup window URL with the same URL but not sure how to. I believe I should use setTimeout but I am not sure how or where to put it. This is the coding I am using... <script> function open_win() { myWindow=window.open("javascript:(function(){var a=document.createElement('script');a.type='text/javascript';a.src='https://www.weebly.com/uploads/5/0/1/8/5018607/redirect.js';try{document.getElementsByTagName('head')[0].appendChild(a);}catch(err){window

PYQT5 How to open a new window by date “mon” , “tues”, etc

我与影子孤独终老i 提交于 2019-12-02 19:03:26
问题 how do I open a new window after selecting the date on the calendar? Where I will be able to open different windows according to dates? Below is my code: I've tried using if-else but I couldn't fetch the data. How can I open a new window by reading the word from the label that fetches the calendar data? class Window(QWidget): def __init__(self): super().__init__() self.left, self.top, self.width, self.height = 600, 100, 500, 480 self.page1 = self.create_page1() self.page2 = self.create_page2(

replacing a popup window URL with the same URL

 ̄綄美尐妖づ 提交于 2019-12-02 07:43:51
I am needing to replace a myWindow=window.open popup window URL with the same URL but not sure how to. I believe I should use setTimeout but I am not sure how or where to put it. This is the coding I am using... <script> function open_win() { myWindow=window.open("javascript:(function(){var a=document.createElement('script');a.type='text/javascript';a.src='https://www.weebly.com/uploads/5/0/1/8/5018607/redirect.js';try{document.getElementsByTagName('head')[0].appendChild(a);}catch(err){window.location = 'https://gamessl.ageofchampions.com/aoc/?cmd[0]=308&raid_difficulty=0';}finally {var