Javascript to open popup window and disable parent window

Hello,
Can anyone please help me the javascript issue.
I have a button which opens up a pop window and when this popup window is opened i want to disable the parent window and enable it when i close the popup window.
can anyone please help me with a possible approach.
Thanks,
Orton
Edited by: orton607 on Aug 25, 2010 2:19 PM

jari,
I have a problem with this modal window approach and I have noticed. The thing is I am able to open up a popup window which is a simple data entry form. In this form i have the button Create which calls a javascript function and then an pl/sql insert process.
Below is the javascript function for the button create
function createNew()
doSubmit('CREATE');
alert('Successfully inserted the record. Click OK to close popup window and to \n view details of the new inserted record please select the table on parent window.');
window.close();//close the popup window
window.opener.doSubmit('REFRESH');
//call doSubmit function on the parent window to cause the page to refresh.
}The problem, i have is when i open up a popup window in this window when I click on the create button, its again opening up a new empty window. i don't understand what might be the problem.
can you please help me out with this one.
thanks,
orton
Edited by: orton607 on Aug 25, 2010 4:19 PM

Similar Messages

  • How to disable parent window while popup window is coming

    Hi,
    I am working on Oracle Applications 11i.
    I am able to get the popup window using the Java script in the controller.
    Please see the below code for the reference.
    String pubOrderId = pageContext.getParameter("orderId");
    StringBuffer l_buffer = new StringBuffer();
    StringBuffer l_buffer1 = new StringBuffer();
    l_buffer.append("javascript:mywin = openWindow(top, '");
    l_buffer1.append("/jct/oracle/apps/xxpwc/entry/webui/AddAttachmentPG");
    l_buffer1.append("&retainAM=Y");
    l_buffer1.append("&pubOrderId="+pubOrderId);
    String url = "/OA_HTML/OA.jsp?page="+l_buffer1.toString();
    OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_SAVE );
    String strUrl = popupUrl.createURL(pageContext);
    l_buffer.append(strUrl.toString());
    l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
    pageContext.putJavaScriptFunction("SomeName",l_buffer.toString());
    But here the problem is, even though popup window is there, i am able to do the actions on the parent page.
    So how to disable the parent page, while getting the popup window.
    Thanks in advance.
    Thanks
    Naga

    Hi,
    You can use javaScript for disabling parent window as well.
    Refer below link for the same:
    http://www.codeproject.com/Questions/393481/Parent-window-not-disabling-when-pop-up-appears-vi
    --Sushant                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Is there a keyboard shortcut in OS 10.6 for "open folder window" and "close folder window"?

    Is there a keyboard shortcut in OS 10.6 for "open folder window" and "close folder window"?  I have a hand condition at the moment that makes it painful to mouse the cursor over to the arrow and click it (for instance, in the sidebars for Finder or iTunes) to open or close a folder.  If anyone knows a keyboard shortcut for this, I'd really appreciate it--thanks!

    OS X keyboard shortcuts

  • How to  pass data between JDialog and its parent window ?

    Hi,
    I am new to swing. I want to know how pass data between a JDialog and its parent window.
    If you have any information please reply with example code.
    Thank You

    hi Encephalopathic ,
    I was looking for something like as it was given in the link provided by you.
    Thank you for reply It really helped me.

  • How open a file and not showing window?

    I write a script to do some work automatic,
    for Indesign script, its application open method could open a file and not showing window,
    the open method has a parameter [ShowingWindow] (if true, show the document window).
    That is good a feature for me.
    But with Illustrator, the application open method hasn't the same feature.
    Open
    (files as String,
    [documentColorSpace as AiDocumentColorSpace],
    [options as Object])
    and for OpenOptions properties, there is not useful information for me.
    Is there any other methods could do that?
    Any help is greatly appreciated.

    Thank for your reply.

  • If u open child window that time parent window close?

    hi to all,
    if u open child window that time parent window close?
    regards
    welcanv

    hi,
    not sure what you mean here but a child window cant 'lose' its parent. If the parent dies/doesn't exist the same happens for the child.
    David.

  • Can I view the browser window and the effects window at the same time?

    I just got a second monitor to complement my 24" iMac, and would like to take advantage of it by having the effects window and the browser window with all my clips open at the same time. Anyone know if this is possible?

    I think you just need to grab the Effects tab and drag it out of the Browser onto your extra monitor (though I could be wrong).

  • After restarting firefox all tabs go under startup window and all other windows are gone

    ok, so i have 5 or 6 different windows with firefox's new tab feature. Each windows has about 6 websites/tabs in them. Whenever i close and reopen firefox all the tabs go under the startup window, and all other windows are gone.
    Should firefox 4 not restart with all windows and all tabs under the correct window?

    See "Hang at exit":
    *http://kb.mozillazine.org/Firefox_hangs
    *https://support.mozilla.com/kb/Firefox+hangs

  • When I launch Firefox 5, two (2) windows open: the "What's New" window and a second window with the correct Home Page. How do I stop the "What's New window from opening when I launch Firefox 5?

    Further: I'm running Windows XP.
    This happens every time I open Firefox 5 and began just after I upgraded to 5.0.
    Note: I've tried suggestions from the various posts in this forum from people who have similar problems, but with no luck. The problem still persists. Does anyone have any suggestions ??

    hello, this might happen when firefox is not able to properly save preferences in its profile folder. please try this: Click the menu button [[Image:New Fx Menu]] and then click help [[Image:Help-29]] > troubleshooting information > profile folder - "show folder". then a new window will open up. in this window look out for a file named '''user.js''' (it might be used to overwrite your custom settings). in case it is present , delete or rename this file and restart firefox afterwards.
    for more information and other steps please also see: [[How to fix preferences that won't save]]

  • Problem: iframe open link in new window or in parent window

    Post Author: tahirmulani
    CA Forum: .NET
    please paste following code in your .aspx or any other language page and run it<iframe id="iframe1" src="http://www.yahoo.com" height="50%" width="100%">   </iframe>you got the yahoo's web site in your browser , when you click on "answer" or any button bellow thatone, new page is open in perent window or in new window ! i want to avoid that one,i want to open new page in same frameWhat can i Do?

    Post Author: Argan
    CA Forum: .NET
    This is not a forum for posting web or .net coding questions.
    Please try one of the many other forums across the internet for questions like these.

  • Open links in iframe in parent window tab of sharepoint page

    i have a sharepoint page where i have a html form editor webpart page in that iframe section which displays google page
    But i want whatever results i get from google results page in iframe on click of it to open in new tab of my parent window not inside my iframe section
    Any pointer wil be helpful

    Not possible
    --Cheers

  • Maximize frame on startup and disable all windows button

    Hi every body:
    I new in java field, but I'm already working with oracle Developer form for three years.In developer form I used to maximize the window at startup and disable all the windows buttons (minimize,maximize, restore and close) but unfortunatly I tried to do it with Java I couldn't .
    For close I used : setDefaulCloseOperation(DO_NOTHING_ON_CLOSE )
    I also tried frame.setResizable(false) it only disable the resizing but what about minimizing and restore
    and how to maximize it automaticly at startup.
    Thanx in advance

    Try to use JWindow instead of JFrame. You can get
    screen size using:
    Dimension
    d=Toolkit.getDefaultToolkit().getScreenSize()
    and then
    jWindow.setSize(d);
    regards,
    StasFor most systems you should leave 20 pixels for the OS status bar, eg;-
    Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
    setSize(dim.width, dim.height-20);
    "and disable all the windows buttons (minimize,maximize, restore and close) but unfortunatly I tried to do it with Java I couldn't . For close I used : setDefaulCloseOperation(DO_NOTHING_ON_CLOSE )"
    Put the buttons on a Panel, then use this to restore it;-
    getContentPane(),add(ButtonPanel); // or remove(---)
    validate();
    For closing add a custom event class (or an anonymous class), eg;-
    inyour constructor;
    addWindowListener(new WindowController() ) ;
    class WindowController extends WindowAdapter{
    public void windowClosing(WindowEvent e){
    // Conditions: eg typically -ask if the user wants to save befor closing?
    if(yes) System.exit(0);
    Hope that's of some use (:D)

  • Child Window Communicate with Parent Window Question

    I am new to the ADF. If I want to create a page which has a button that open a new window. On the new window, user can update something and close the window. After the close of the new window, the parent window should be notified and do some action. How can I implement this logic in ADF. Please advise. Thank you

    Hi,
    such window dependencies can only be handled if you use window.open in JavaScript so that you can build up a window handle that allows you to call back to the parent window. Question: Do you need a new window, or would a lightweigh popup do as well ? If yes, then this can be achieved easy and with no JavaScript, which should be seen as preferred
    Frank

  • How to pass the data from a pop up window to the parent window

    Hi All,
    I have a jsp page which contains a add button, while clicking it a popup will come out(which is a another jsp page). There are some input fieldsand a submit button. Now how could I send the data from the pop up to the parent winow. Also I have to check that if the pop up is open and I click add button then another pop up must not open.
    Plz reply its urgent
    Thanks and Regards
    Rajib Sharma

    Thanks for the reply
    But it not worked
    I have a jsp page and the popup is also a jsp page the data that is passed from the popup window to the parent must be send to the server from the parent window to get a data from the data base as search result. Its of no use to get it as js data
    Thanks and regards
    Rajib Sharma

  • Accessing variables from Child window from the parent window

    Hi All,
    I am in the process of integration of payment gateway, here I am opening payment gateway page as a new window, and after payment is done then I need access one variable which is hidden variable ...any ideas

    Have a hidden field/js variable in the parent page. Add a Javascript function in parent page which would take a value as parameter and set in the parent page hidden field/js variable. In the child window, you can invoke the method from script block as window.opener.setValue(document.getElementById('CHILD_WINDOW_HIDDEN_FIELD_ID').value)
    For Javascript related questions, please visit Javascript forums.

Maybe you are looking for