How to open a pop up in a newly opened window

Hi,
I have a requirement where, upon a button click in Main.jsff page I am opening a PDF file in a new window in the same browser. As soon as the PDF file is opened in the new window I need to display a popup which has to come on top of the PDF window and blur the PDF file window.
Currently I am using the below javaScript for doing this.
FacesContext ctx = FacesContext.getCurrentInstance();
ExtendedRenderKitService erks = org.apache.myfaces.trinidad.util.Service.getRenderKitService(ctx, ExtendedRenderKitService.class);;
String script = "window.open('" + urlString + "', '', 'location=0, status=0, resizable=1, scrollbars=1');";
erks.addScript(ctx, script);
String toSetFocus = "window.focus()";
erks.addScript(ctx, toSetFocus);
getP2().show(hints);But the pop up is not opening on the pdf window. Its opening on the Main.jsff window. Can anyone let me know the right way to implement this ?
I am using jdev version 11.1.2.0.0
Thanks in advance,
Kavitha

this is the javascript i used to do this
function showDoc(URL, aWinName, title) {
     var wOpen;
     var sOptions;
     var popupWindowWidth = 725;
     var popupWindowheight = 480;
     sOptions = 'status=no,menubar=no,scrollbars=yes,toolbar=no';
     sOptions = sOptions + ',width=' + (popupWindowWidth).toString();
     sOptions = sOptions + ',height=' + (popupWindowheight).toString();
     sOptions = sOptions + ',screenX=0,screenY=0,left=0,top=0';     
     globalHTML = "<html><head><title>"+title+"</title><meta charset=\"utf-8\"></head>"
               + "<frameset rows='100%,*'><frame src='" + URL + "'></frame>"
               + "</frameset></html>";
     wOpen = window.open("javascript:opener.globalHTML", aWinName, sOptions);     
     wOpen.focus();
     wOpen.moveTo((screen.availWidth - popupWindowWidth) / 2,
               (screen.availHeight - popupWindowheight) / 2);     
     return wOpen;
}

Similar Messages

  • If I open a pop up. The screen opens but the contents don't load. How do I solve this?

    In my website build with joomla. I have to insert tables and links and stuff by opening a pop up. They do open but the needed contents doesn't load. This also happens with online game: goalunited (classic version)

    Hello briank22,
    go to [http://kb.mozillazine.org/About:config about:config], find :
    privacy.popups.showBrowserMessage
    and
    browser.popups.showPopupBlocker
    and be sure it is the default TRUE (if it is false, double-click on each one to make it true)
    thank you

  • How can one stop switching Desktops to a newly opened app?

    If I am working on something, Chrome, Word, whatever, in one Desktop, and I start another app not to use immediately but to use in 5 minutes, it switches to that app's Desktop automatically, even if the app is not ready to use right away. I need to switch back. Earlier, I started Chrome, and it switched, so I switched back, then it switched again, so I switched back, then again. 3 times! How annoying is this. I am working in a different app, I dont need the new one in focus right away.
    So wondered if anyone knows a way to stop this?
    Thanks

    Note: I just found this which does stop it http://mactips.dwhoard.com/mactips/other-applications/spaces-auto-switching
    defaults write com.apple.dock workspaces-auto-swoosh -boolean NO
    BUT this also stops the Cmd + Tab application switcher which I use all the time!

  • Can I make my cursor stay with a newly opened folder selection?

    When I open a folder in my documents, the cursor jumps to the top of the page instead of staying with that selection. I have lots of folders with lots of entries in each. I then spend a lot of time scrolling down to find where I left off. How can I make the cursor stay with newly opened folder in stead of automatically jumping back to the very top of the documents?

    Hi Barney. My finder view is list.                         ...up to here. I know have to scroll back down to Folder B to
        Sample:                                                           to click on sub a. When I do, It jumps back up here. I scroll  Folder A                                                             down to Folder B, sub a, and then find my pdf. I have many
      Sub folder a                                                       more more Folders to search, and each time, the curser
       doc                                                                   jumps up here instead of letting the screen show the               xls                                                                   selected folder's contents. 
       doc                                                                 
       jpg     
    Subfolder b
       xls
       pfd
    >Folder B             I open B, and the curser jumps...
      Sub folder a
      pdf
       doc
      etc

  • When i try to boot itunes, screen goes black and a message pops up and says not compatible with the visual elements. how do i fix this? itunes wont even open at this point. please help. thanks :)

    When i try to boot itunes, screen goes black and a message pops up and says not compatible with the visual elements. how do i fix this? itunes wont even open at this point. please help. thanks

    Let's first try the following document, only be sure that none of the boxes in the compatibility mode tab are checked (not just the compatibility mode box itself):
    iTunes for Windows: How to turn off Compatibility Mode

  • How do I get my computer to start opening up files instead of opening a pop up window rather than the file?

    My computer has started opening up pop up windows that say, "Step 1: Select File, Information Gathered Successfully, Step 2: Click Show Information Button", instead of opening the file I click on. This informaion windown has generated another pop up window that suggests I visit the iTunes store for an app that will open the file. Twice I have purchased apps that the iTunes store said would open the file. Twice the apps have made no difference at all. The apps did not open the file. Even more frustrating than being sold apps that don't work is that the files I'm trying to open are textedit files created with the software on the very computer that is now refusing to open them.
    How do I get beyond the pop-ups and open the files I created?
    Is it possible to return the apps that iTunes said would work, but did not?

    Please post a screenshot that shows what you mean. Be careful not to include any private information.
    Start a reply to this message. Click the camera icon in the toolbar of the editing window and select the image file to upload it. You can also include text in the reply.

  • How do I reinstate the information bar that shows the prevention of opening a pop-up window?

    After Firefox opened the information bar telling me they blocked a pop-up window I inadvertently clicked the option link and deleted the information bar from coming up again.
    How do I reinstate the information bar that shows the prevention of opening a pop-up window?
    == This happened ==
    Just once or twice
    == I clicked the option link and selected the "do not show this again" option

    I set browser.popups.showPopupBlocker to false, and information bar still appears.
    When I also set privacy.popups.showBrowserMessage to false, it doesn't appear.
    To test, whether the information bar appears, I use
    [http://www.popuptest.com/popuptest3.html]
    So, set to true preferences
    privacy.popups.showBrowserMessage
    and
    browser.popups.showPopupBlocker
    Both of them!!!
    Does it help you?

  • I'm using tweetdeck to open links but after i update to 14.0.1 version, the window open or pop out every single time when I open the links, how can i do?

    I'm using tweetdeck to open links , I can click on tons of link I want to open without the firefox window pop up but after i update to 14.0.1 version, the window open or pop out every single time when I open the link, how can I just open the link but not the window?

    yesssssss , EXACTLY !!!! before the update ,whenever I open an external link, Tweetdeck used to stay in front, and now Firefox moves in front of Tweetdeck<<<< EXACTLY !!!

  • "I have to manually select pop up blocker everytime i open firefox. how can i make it permenent?'

    i have to manually select pop up blocker everytime i open new firefox window. How can i make this arrangement permenent?
    == This happened ==
    Every time Firefox opened
    == a week ago

    See http://kb.mozillazine.org/Preferences_not_saved

  • HT4796 I just downloaded the Windows Migrator and tryed to open it.  A window popped up saying "YOU CANT OPEN THE APPLICATION BECAUSE MICROSOFT APPLICATIONS ARE NOT SUPPORTED ON OS X".  How do i transfer my file?

    I just downloaded the Windows Migrator and tryed to open it.  A window popped up saying "YOU CANT OPEN THE APPLICATION BECAUSE MICROSOFT APPLICATIONS ARE NOT SUPPORTED ON OS X".  How do i transfer my files?

    An .exe application is compiled for Windows. It will not run on a different OS. If you need to run this program, then you will have to install Windows on your Mac. Either as a separate bootable partition, or running in a virtual machine, such as Parallels or VMWare.

  • My mac has been updated and when i go to install the newest itunes this pops up. 'Couldn't open "Install iTunes.pkg". This package type requires Mac OS X 10.5.' how can i fix this so i can get the new itunes?

    my mac has been updated and when i go to install the newest itunes this pops up. 'Couldn't open "Install iTunes.pkg". This package type requires Mac OS X 10.5.' how can i fix this so i can get the new itunes?

    Hi
    Try to use "software update" option
    to to apple menu -> software update  or system preference -> Software update
    ( you may try to use an old package  on new system )
    HTH

  • I get an events summary pop up every time i open my mac after its asleep. how do i turn it off?

    i get an events summary pop up every time i open my mac after its asleep. how do i turn it off?

    I don't recognize this pop up.  What are the options in the gear dropdown- right side of your image.
    You can open a temporary guest account to see if the problem persist in this environment.  If no than it is your user account.
    Try a safeboot and test to load only system apps no 3rd party.
    SafeBoot  http://support.apple.com/kb/HT1564
    If the pop is gone I suspect third party software interference.
    Log at your log-in items and remove the offend app.
    >SystemPreference>Users&Groups>Log-in items  (unlock the padlock)

  • My college wifi opens a pop-up in the login process, which my ipad is not allowing. how can i get to allow pop-ups in login process?

    My college wifi opens a pop-up in the login process, which my ipad is not allowing. how can i get to allow pop-ups in login process?

    You may have pop-ups blocked.
    Go to Settings>Safari and turn "Block pop-ups" off. You may needs to restart the ipad after turning off this settings if it doesnt work immediately

  • How can I force pop-ups being opened in a new tab

    We've a new software which always opens a pop-up window when clicking on the Java links. The content of such a re-sizable window perfectly fits into a new tab.
    I'd like to force those new windows into a new tab.
    Pop-up blocker is active and that internal site is in the exception list.
    So it would be nice to have an option field for that in the general settings or in the Pop-up blocker settings.
    This is no bug, but could be a new feature of Firefox (like in IE).
    Thanks &
    Kind regards,
    Peter Marbler

    The easy way is to install 'Tab mix plus' addon and under 'links' set 'Java script & pop up restriction' to 'open all pop ups in tabs'.
    You can also use https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/ to tweak a bunch of other tab settings.
    There is always about:config but more often than not there is the easy way, an addon that will do it for you.

  • How do I get rid of the space game that keeps popping up every time I open Firefox?

    There is a space game that pops up every time I open the internet in Fire Fox. It does not do it in with Google Chrome or Internet Explorer. I have to click "control", "alt" "a" to get it to stop playing every time or it will continually send up little space like ships and make shooting noises (so annoying). I just want it off of there, so I don't have to mess with it. Can you please help me remove it.

    If this isn't on the built-in Firefox home page, it could be caused by an add-on. To rule out one of your extensions is involved, could you try Firefox's Safe Mode? That's a standard diagnostic tool to deactivate extensions and some advanced features of Firefox. More info: [[Troubleshoot Firefox issues using Safe Mode]].
    You can restart Firefox in Safe Mode using either:
    * "3-bar" menu button > "?" button > Restart with Add-ons Disabled
    * Help menu > Restart with Add-ons Disabled
    Not all add-ons are disabled: Flash and other plugins still run
    After Firefox shuts down, a small dialog should appear. Click "Start in Safe Mode" (''not'' Reset).
    Any difference?

Maybe you are looking for

  • How can I get the address bar to just display URLs?

    With the newest update to Firefox when I type something in the address bar I get more search suggestions than URL suggestions. I only want URL suggestions and want to turn the search off completely. I've tried turning off the "keyword:enable" on the

  • Current DDR Clock

    Greetings - My Fellow MSI users!! This is my first post and I'd like to welcome myself...   Thank you, thank you!! I must start off with saying that I've built a number of rigs before, but to date I'm having the most fun with this one (see specs in s

  • ALV_GRID_CONTROL - columns

    hello, i've added new column in my it_table but i can't see it after compiling.. Please help! Maja

  • Re-install CS3 (Design Premium)

    I had a crash on my iMac. When I tried to re-install my (in 2007 purchased) CS3 software, I got the message that it was an invalid serial number. Also "redeeming" the number through the site doesn't work. I have used the software for 7 years now, why

  • How to add a picture in Background of Sing in and Sign out Screen

    Hi MOSC, How do i add a picture in the background of Sing in and sign out screen in HCM People Soft 9.2 and People Tools 8.53. Also, how do i get rid of the Language are from the sign on page. thanks, Response will be greatly appreciated! User 501241