Open new window in the same Window

Im developing a project in JavaFX where I wish to open the new window in the same window
Here is my code :
Stage st=(Stage)((Node)t.getSource()).getScene().getWindow();
I tried this but its giving an exception

It is possible to specifiy a named window instead of _blank.
So you could use the following instead:
web.show_document('html/hello.htm','my_window');
where my_window can be anything you want to call that browser window.
However, I have discovered that if you put this in a button trigger, the second time you press the button (if the window is still open) it will not take focus - ie. it remains in the background.
You can get around this by closing the window if it is already open:
web.show_document('html/close.htm','my_window');
web.show_document('html/hello.htm','my_window');
The close.htm needs to contain some javascript to close the window:
<html>
<body onload="closeit()">
<script>
function closeit()
window.opener = top;
window.close();
</script>
</body>
</html>
Apparently XP SP2 is a little stricter with javascript and may not allow this. Also, not sure if this works in all browsers, I only tried IE6.

Similar Messages

  • Open new document in the same window as before..how to?

    Dear all,
    I need to open a image document in a new browser window each time the user clicks on a particular button. The built-in I'm using is web.show_document('URL', '_blank'). But this opens a new browser window each time the button is clicked. The client wants to have open it in the first time in the day (in a new browser window) and later on open the new image on the same browser window. Do not want to open a new browser. I have tried the '_top' and '_parent' but they replace my application.
    Is there any way to open the image in the same open window? Please advice.

    It is possible to specifiy a named window instead of _blank.
    So you could use the following instead:
    web.show_document('html/hello.htm','my_window');
    where my_window can be anything you want to call that browser window.
    However, I have discovered that if you put this in a button trigger, the second time you press the button (if the window is still open) it will not take focus - ie. it remains in the background.
    You can get around this by closing the window if it is already open:
    web.show_document('html/close.htm','my_window');
    web.show_document('html/hello.htm','my_window');
    The close.htm needs to contain some javascript to close the window:
    <html>
    <body onload="closeit()">
    <script>
    function closeit()
    window.opener = top;
    window.close();
    </script>
    </body>
    </html>
    Apparently XP SP2 is a little stricter with javascript and may not allow this. Also, not sure if this works in all browsers, I only tried IE6.

  • How to open a new iView in the same window?

    Hi
      i want to open a new iview in the same window.How can i do that ?
    Thanks

    Hi,
    If u want to code in WDJ  ..
    Use following method
         WDPortalNavigation.navigateAbsolute(
         "ROLES://<PCD location>,
         WDPortalNavigationMode.SHOW_INPLACE,               WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,
         (String) null  );
    SHOW_INPLACE is the key
    Cheers!!
    Ashutosh

  • How can I make "Open Link in New Tab" open the new tab in the same window, not a different window?

    When I Ctrl-click a link and choose "Open Link in New Tab" it chooses to open the new tab in a different window (one that's already open) rather than opening the new tab in the same window. Even though the other window is minimized, it automatically gets restored and placed on top of the window I was in. This interferes with my context, forcing me to minimize the window again to get back to the one I was in before. I want the new tab to open in the same window, so I can still see the tab I was in. Some links seem to have the "Open Link in New Tab" behavior automatically, so I never know when I'm going to get thrown out of my current window. Very annoying.

    If you have a mouse with a scroll button then try to middle click the link to open the link in a new tab.
    It is also possible that the links use onclick JavaScript instead of a href to specify the action.
    See also:
    * http://kb.mozillazine.org/browser.link.open_newwindow.restriction
    * http://kb.mozillazine.org/browser.link.open_newwindow

  • My safari stopped letting me open a new tab in the same window. what happened and how can I get it back to normal?

    When I try and open a new tab in the same window, it wont open a new tab. It leaves the page I am on and goes to the "top sites page."

    Hi,
    If you have got to  Mountain Lion OS X 10.8.2 and therefore Messages version 7.0.1 then double click the individual chats.
    Once they are in separate windows you can chat like that  (That's the way I used to chat - I didn't even use the tabbed chat)
    It is impossible to create a separate Chat window each new chat (you have to separate them off from the main window which also keeps a "copy")
    New chats are added to the main window even if you have used the red button to hide it. (CMD + 0 from the Window menu brings it back)
    10:49 PM      Tuesday; November 20, 2012
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.2)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Hey, im really sick of this, how can i open folders but in the same windows, when i open a folder which is inside of another one, it just open me a new window, its so annoying, could anyone tell me what to do? im using mac os 10.7.2

    hey, im really sick of this, how can i open folders but in the same windows, when i open a folder which is inside of another one, it just open me a new window, its so annoying, could anyone tell me what to do? im using mac os 10.7.2

    Finder > Preferences > General > Always open folders in a new window: uncheck

  • "Open each folder in the same window" not working

    hey guys, just today, I noticed that whenever i double click a folder, it opens in a new window.  I went to folder properties, and made sure I checked "Open each folder in the same window," and its checked.  I tried switching it on, then off, then restoring all defaults in both those settings and the view settings, and I've tried restarting the computer, even using a system restore point.  No Matter what, whenever I double click a window, it opens in a new window, but if I use the navigation pane, or if I highlight a window and click the open button at the top left, it opens in the same window.  This is very very very annoying, because just navigating my harddrive, I might end up with 20 windows open to reach just 1 file.
    Does anyone know what's wrong?  or how I can fix this? 

    I was experiencing this same issue on my laptop and spent several frustrating hours of searching in vain for a solution. I tried most of the same fixes mentioned here with no success (re-registering DLL's, running the system file checker [sfc /scannow],
    turning off the navigation pane, performing virus scans, etc). After almost giving up, I discovered that I only experienced this behavior when I accessed Explorer from the shortcut which was pinned to my taskbar. When I opened the "Computer" shortcut
    on my desktop, I was able to open individual folders without having new windows open each time. I suspect that this is related to the new design/function of the taskbar in Windows 7. To get the results I wanted, I opted to revert to the "classic" style
    taskbar seen in Windows Vista (AKA the "Quicklaunch" toolbar) by following the instructions here:
    http://www.howtogeek.com/howto/windows-7/add-the-quick-launch-bar-to-the-taskbar-in-windows-7/
    Then, I simply added a new shortcut to "Computer" in the new Quicklaunch toolbar and, "Voila!" - problem solved. Oddly enough, I don't experience the same behavior on my desktop PC which is also running Windows 7. Ain't Microshaft grand?!? (a-hem)

  • Open all documents in the same window ?

    How in Reader 9 can I configure it to open all documents in the same window instead of as individual windows?
    Thanks

    Bug report sent to Adobe:
    ******BUG******
    Concise problem statement:
    MDI removed from Reader 9
    Steps to reproduce bug:
    1. Open more than one document.
    2. Look at taskbar overflowing.
    3.
    Results: Customer is pissed off.
    Expected results: Happy customer.
    Steps to make customer happy: Get your heads out of your ***, and make MDI not just an option, but the DEFAULT. Who the hell thought going back to Windows 3.0 SDI interface technology was a good idea? Please post his/her name, and whoever approved that decision's name publically, because a) they will (or should) be looking for a new job since they just got fired, and b) I don't want to make the mistake of hiring them. I mean seriously. I thought what I was reading on the web was a hoax. I had to check snopes.com to be sure. Do you guys not have a random drug testing policy? For that matter, do you not realize that when a person, that you're trusting to make important decisions that affect millions of people, is sitting at their desk drooling on themselves and can't get out more than a single syllable word, that maybe, just maybe, they're not the person you should have in that position? Is this a product line wide decision? Should I look at scrapping all of my other Adobe / Macromedia products and upgrading to those that support 15 year old technology? Are you going to turn into another Symantec? Hey, lets buy take over great companies with great products, turn the product lines into crap, and then discontinue and abandon them. Seriously, what should we expect for Reader 10.0? Are you going to be upgrading to a console application? Please, please, please for 11.0 can we have it be phosphorous green too? I think Im going to go back to my bottle of wine now

  • How to open KM file in the same window

    When we open KM file by /irj/go/km/docs/... link it is previewed in a new Internet Explorer window.
    We changed Targed property to Self for iView navigation in LayoutSet render but the image file is still opend in new Window.
    How to workaround this?

    We changed Target Window Type property value of ResourceRenderer of Navigation iView  to Self.
    When an authenticated user  tries to open KM file it is opened in the same window if file URL include /irj/servlet/prt/prtroot....
    If file URL contain /irj/go/km/docs/.. it is opened in new window.
    When an anonymous user  tries to open KM file it is opened in a new (popup) window.
    We need that anonymous user can open km files in the same window.
    How to work around this?
    We use light framework.

  • Can't open a tab in the same window

    Hello, tell me, please, why can't I open a new tab in the same window. maybe I did something wrong done in the settings?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    *Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • IT WILL NOT LET ME OPEN UP 2 OF THE SAME WINDOW

    WHEN I TYPE A LETTER IN TO THE URL LIKE “M” FOR EXAMPLE TO GO TO THE FIRST CHOOSE WHICH IS http://www.mozilla.com/en-US/firefox/fx/ AND THEN I OPENED A NEW TAB AND PUSH “M” AGAIN TO OPEN http://www.mozilla.com/en-US/firefox/fx/ AGAIN I CANNOT DO IT, IT WILL NOT LET ME OPEN UP 2 OF THE SAME WINDOW

    If you want to load a second copy of ''the page you are viewing'' in a new tab, you can press Alt+Enter in the address bar.
    If you want to load a second copy of ''some other page'' that is open, as you noticed, instead of showing the URL, the awesomebar drop-down shows "Switch to Tab." Not everyone likes this feature, so someone created an add-on to turn it off.
    [https://addons.mozilla.org/en-US/firefox/addon/switch-to-tab-no-more/ Switch to Tab no more :: Add-ons for Firefox]
    Does that help?

  • I can not open new tabe in the same page

    i can not open new tabe im the same page
    when i click on new tabe , it donsnt open at all

    Uninstall the Ask toolbar and it should work again. There is a compatibility issue with the Ask toolbar and Firefox that prevents new tabs from being opened.
    There are a couple of places to check for the Ask toolbar:
    * Check the Windows Control panel for the Ask Toolbar - http://about.ask.com/apn/toolbar/docs/default/faq/en/ff/index.html#na4
    * Also check your list of extensions, you may be able to uninstall it from there - https://support.mozilla.com/kb/Uninstalling+add-ons

  • Is there a way to add two windows in the same window?

    is there a way to add two windows in the same window?

    what do you mean by your first use of the word "window"? do you mean a visible frame? a section of the gui that the user doesnt see?
    or perhaps you mean you want to add multiple tabs to a single window, so that switching between tabs shows different windows?

  • Why firefox in my desktop can't open a new tab in the same windows?

    I can't open a new tab by clicking the + symbol. I don't know why this happen. If I want to open a new tab, I have to take a right click and then choosing open new tab. I think this is so terrible, I can't access the page on the same windows.

    Uninstall the '''''Ask Toolbar'''''. It can cause that problem.
    *http://support.mozilla.com/en-US/kb/Uninstalling+add-ons
    *http://support.mozilla.com/en-US/kb/Cannot%20uninstall%20an%20add-on
    *http://kb.mozillazine.org/Uninstalling_toolbars
    If that does not solve your problem:
    *See --> [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes Troubleshooting extensions and themes]
    *See --> [http://support.mozilla.com/en-US/kb/Troubleshooting+plugins Troubleshooting plugins]
    *See --> [http://support.mozilla.com/en-US/kb/Basic+Troubleshooting Basic Troubleshooting]
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *Adobe Shockwave for Director Netscape plug-in: [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *'''''Adobe PDF Plug-In For Firefox and Netscape''''': [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *'''''Shockwave Flash''''' (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • I am not able to open a new tab in the same window.

    I was able to opennew tabs in the same window but now I am unable to do it

    hello, can you try to replicate this behaviour when you launch firefox in safe mode once? if not, maybe an addon is interfering here...
    [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]]

Maybe you are looking for

  • X120E Touchpad inoperable after resuming from sleep

    hello friends I'm a happy X120E user and a tech [pc's, mac's, lans, etc] - I do all sorts of tasks with my x120e and its been great.  I recently "upgraded" my SSD so a fresh new install of Windows 7 was in order.  After updating everything I have a p

  • Cannot Update Photoshop CS5 to Camera Raw 6.7

    I am trying to run updates on Photoshop CS5 Camera Raw 6.7 it errors out and and it will not update.  Any ideas?  The error just sit there and help talks about entering my serial number, but there is no prompt to do so.

  • Itunes Store won't open since update

    So ever since I updated to ios 7, I cannot open the Itunes Store on my phone. It acts like it is going to load and then it just crashes. I have tried hard resetting my phone and it didn't solve the problem. Has anyone else experienced this or have an

  • OBIEE 11.1.1.6 as Simple Install , Error in Server logs

    Hi Guys, I have newly installed OBIEE 11.1.1.6 as Simple Install and I am finding this error in my server logs, So please can you guide me to resolve this impending issue? ####<Apr 23, 2012 12:06:06 PM IST> <Notice> <WebLogicServer> <Vijay-PC> <Admin

  • Decentral Adapter not showing up in RWB

    I have just installed a J2ee Decentral Adapter instance, configured the exchange profile to connect back to the main PI instance and connected it to the SLD (both the J2ee Decentral Adapter and main PI instance use the same SLD).   One of the last st