This discussion is archived
8 Replies Latest reply: Nov 13, 2003 1:52 PM by 30485 RSS

Opening modal browser windows

312969 Newbie
Currently Being Moderated
I have a question concerning opening modal browser windows.

The UIX framework provides a javascript function called "openWindow". E.g. the ui:dateField uses this function to open it's separate browser window.

The good thing using this function is, that the opener browser window gets shadowed and isn't accessible anymore.

Therefore I also want to use this function to open my own modal windows. The problem here is that any postback in the modal window enables the opener window again.

Interesting point is, that the date picker for a ui:dateFields also performs postbacks but the opener window stays shadowed.

How can I perform postbacks in my own modal window and keep the opener window disabled?
How does it work when using the date picker?
  • 1. Re: Opening modal browser windows
    312396 Newbie
    Currently Being Moderated
    Hi, Christian.

    I'm sorry, but I don't know the details of the javascript used with the datefield, and I doubt anybody on my team has the time to write up a great response to your questions. However, you're free to look at the HTML source that UIX generates, and the javascript for the dateField is in the jsLibs directory of the UIX installables. Hopefully if you study the scripts you'll be able to figure things out.

    Hope this helps,
    Ryan Pollock
    UIX Team
  • 2. Re: Opening modal browser windows
    30485 Newbie
    Currently Being Moderated
    Christian -

    I can provide some background about how the modal date picker window deals with this issue - and I think that you can use the same technique...

    The UIX body component has a built-in unload handler that gets called when the page is unloaded - for example, when you post data in your modal window. The unload handler will check to see if the page is a modal child of its parent window - and if so, will re-enable the parent window (the assumption here is that once the page has been unloaded, the modal child will be hidden).

    The solution that UIX uses for the date picker window is to place the contents of the child window inside of a frame set. The actual contents of the window are embedded inside of a frame inside of the frame set. That way, when you navigate inside of the child window, the body's built-in unload handler is still called - but, it no longer enables the parent window, since the body is no longer a child of the parent window - but is a child of the frame set.

    I think that you can implement a similar solution by embedding your modal window contents inside of a UIX frameBorderLayout component.

    Andy
  • 3. Re: Opening modal browser windows
    359882 Newbie
    Currently Being Moderated
    Good Morning,

    I was having a problem similar to Chrisitan's so I tried embedding my modal window contents inside of a UIX frameBorderLayout component as you suggested. This works in part but I am still able to click on the parent window and bring it to the foreground. Is there a way to disable this behavior.

    I took a look at the Uix 2.1.7 Demo UIX Component Guide and noticed the same behavior for the lovField widget. This widget is set up to be model but its not. If you test this widget you will see what I mean.

    Thanks
  • 4. Re: Opening modal browser windows
    30485 Newbie
    Currently Being Moderated
    What browser/browser version are you using to test the lovField component?

    Andy
  • 5. Re: Opening modal browser windows
    359882 Newbie
    Currently Being Moderated
    Good Morning,

    I am using IE Version 6.0.2800.1160.xpsp.030422-1633.

    Thanks
  • 6. Re: Opening modal browser windows
    30485 Newbie
    Currently Being Moderated
    Thanks for the info. I am using an older version of IE (IE 5.5, Windows 2000) - and the lovField child window modality seems to be working as expected. I'll see if I can track down a version of IE/Windows that is closer to what you are using. If you happen to have access to other versions of IE/Windows, can you let us know if this problem repros consistently across versions?

    Andy
  • 7. Re: Opening modal browser windows
    359882 Newbie
    Currently Being Moderated
    Ok.

    Thanks.
  • 8. Re: Opening modal browser windows
    30485 Newbie
    Currently Being Moderated
    Hi -

    Just wanted to confirm that I was able to repro this problem - it does seem to be XP-specific. I have logged a bug against UIX to track this issue.

    Andy