Can I open a window modally in javascript

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jim

    Can I open a window modally in javascript

    I want to be able to open a window from javascript, collect some information
    in the opened
    window and have the opener block until the secondary window is closed. This
    would behave
    like the 'confirm'. Something like:
    function getSubjectName( )
    {
    var selectNameWindo w = window.open(
    "/webAppRoot/GetSubjectName. jsp", .... );
    // Block until 'selectNameWind ow' closes
    var subjectName = selectNameWindo w.document.form .subjectName.va lue;
    return subjectName;
    }

    where GetSubjectName. jsp would present a list of name from which a selection
    is made and a return button that would close the window.

    Can it be done? Does 'selectNameWind ow' persist after it is closed?
    Can you point me to an example or other information on how to accomplish
    this.

    Thanks in advance,
    jim cant


  • Thomas 'PointedEars' Lahn

    #2
    Re: Can I open a window modally in javascript

    Jim wrote:
    [color=blue]
    > I want to be able to open a window from javascript, collect some information
    > in the opened
    > window and have the opener block until the secondary window is closed. This
    > would behave
    > like the 'confirm'. [...]
    > Can it be done?[/color]

    IE-only:



    PointedEars

    P.S.
    Your line-break is b0rken (I skipped the rewrapping here.) Set it below
    80 characters per line, if you can, 72-76 is recommended. And if you use
    automagic line-break, avoid manual ones in paragraphs.

    Comment

    Working...