Keeping a window on top... tell me its possible

Discussion in 'Javascript' started by webdev, Oct 6, 2004.

  1. webdev

    webdev Guest

    Hi,

    I have an application built for the education market in which I open popup
    windows containing ASP scripts which when the user clicks the 'Update'
    button, the database is updated and the window loads a confirmation message
    along with a 'Close this window' link.

    All has gone well in the early stages of testing, but I've now come across a
    problem where a number (a considerable number) of users seem to be incapable
    of clicking in the new window. Instead, they click on the parent window,
    thus hiding the child.

    They lack the knowledge to look on the Windows taskbar for the hidden
    window, preferring to email me telling me that '...nothing happens when I
    click on the link...'

    My first solution was to use <body onBlur="self.focus()"> which does keep
    the window on top, but prevents any data being input to form fields in the
    child window...

    I've looked at the 'Goodman solution' at
    http://developer.netscape.com:80/viewsource/goodman_modal/goodman_modal.html
    .. but this child window disappears if you click the parent twice (yes
    twice - not necessarily more than twice in rapid succession) in IE5.5
    andprevents any input after clicking on the parent in Firefox.

    Now, I'm content with an IE-only solution so I turned to showModalDialog()
    but it seems impossible to close this window unless you click on the control
    box 'X' - anyway, my requirement seems to be for a 'window on top' not a
    'modal dialog'...

    Question is ... Is there a way of creating a child window, which will stay
    on top, accept input to form fields, load another form and allow the user to
    close it from a link?

    Please help - I'm not sure whether to reach for a gun - or a bottle ;0)

    Regards
    Rae MacLeman


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04
    webdev, Oct 6, 2004
    #1
    1. Advertising

  2. webdev

    Andrey Guest

    webdev wrote:

    > Hi,
    >
    > I have an application built for the education market in which I open popup
    > windows containing ASP scripts which when the user clicks the 'Update'
    > button, the database is updated and the window loads a confirmation message
    > along with a 'Close this window' link.
    >
    > All has gone well in the early stages of testing, but I've now come across a
    > problem where a number (a considerable number) of users seem to be incapable
    > of clicking in the new window. Instead, they click on the parent window,
    > thus hiding the child.
    >
    > They lack the knowledge to look on the Windows taskbar for the hidden
    > window, preferring to email me telling me that '...nothing happens when I
    > click on the link...'
    >
    > My first solution was to use <body onBlur="self.focus()"> which does keep
    > the window on top, but prevents any data being input to form fields in the
    > child window...
    >
    > I've looked at the 'Goodman solution' at
    > http://developer.netscape.com:80/viewsource/goodman_modal/goodman_modal.html
    > . but this child window disappears if you click the parent twice (yes
    > twice - not necessarily more than twice in rapid succession) in IE5.5
    > andprevents any input after clicking on the parent in Firefox.
    >
    > Now, I'm content with an IE-only solution so I turned to showModalDialog()
    > but it seems impossible to close this window unless you click on the control
    > box 'X' - anyway, my requirement seems to be for a 'window on top' not a
    > 'modal dialog'...
    >
    > Question is ... Is there a way of creating a child window, which will stay
    > on top, accept input to form fields, load another form and allow the user to
    > close it from a link?
    >
    > Please help - I'm not sure whether to reach for a gun - or a bottle ;0)
    >
    > Regards
    > Rae MacLeman
    >
    >
    > ---
    > Outgoing mail is certified Virus Free.
    > Checked by AVG anti-virus system (http://www.grisoft.com).
    > Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04
    >
    >



    Use modal dialogs for popups instead:

    window.showModalDialog(...) instead of
    window.open(...)

    Modal dialogs are pretty much as regular windows, but you can't click on parent window while dialog
    is open - it should work for you.

    Look here: msdn.microsoft.com/workshop/author/ dhtml/reference/methods/showmodaldialog.asp

    WYGL,
    Andrey
    Andrey, Oct 6, 2004
    #2
    1. Advertising

  3. webdev

    webdev Guest

    "Andrey" <> wrote in message
    news:4oW8d.198681$D%.170422@attbi_s51...
    (shortened)
    >
    > Use modal dialogs for popups instead:
    >
    > window.showModalDialog(...) instead of
    > window.open(...)
    >
    > Modal dialogs are pretty much as regular windows, but you can't click on

    parent window while dialog
    > is open - it should work for you.
    >
    > Look here: msdn.microsoft.com/workshop/author/

    dhtml/reference/methods/showmodaldialog.asp
    >
    > WYGL,
    > Andrey


    Andry,

    This does work, but is there a way of closing the dialog from a link rather
    than expecting an unsophisticated user to click on the control box 'X'?

    Rae MacLeman



    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04
    webdev, Oct 6, 2004
    #3
  4. webdev

    Andrey Guest

    webdev wrote:

    > "Andrey" <> wrote in message
    > news:4oW8d.198681$D%.170422@attbi_s51...
    > (shortened)
    >
    >>Use modal dialogs for popups instead:
    >>
    >>window.showModalDialog(...) instead of
    >>window.open(...)
    >>
    >>Modal dialogs are pretty much as regular windows, but you can't click on

    >
    > parent window while dialog
    >
    >>is open - it should work for you.
    >>
    >>Look here: msdn.microsoft.com/workshop/author/

    >
    > dhtml/reference/methods/showmodaldialog.asp
    >
    >>WYGL,
    >>Andrey

    >
    >
    > Andry,
    >
    > This does work, but is there a way of closing the dialog from a link rather
    > than expecting an unsophisticated user to click on the control box 'X'?
    >
    > Rae MacLeman


    Rae,
    Maybe i misunderstood you but what is the problem with closing a window?
    In your dialog page you place a button:
    <input type='button' value='Close Me!' onClick='window.close()'>
    It does the trick!

    Is that what you need?
    If you need something else, please explain and i'll try to help you

    WYGL,
    Andrey
    Andrey, Oct 6, 2004
    #4
  5. webdev

    webdev Guest

    "Andrey" <> wrote in message
    news:38X8d.191699$MQ5.163499@attbi_s52...
    > webdev wrote:
    >
    > > "Andrey" <> wrote in message
    > > news:4oW8d.198681$D%.170422@attbi_s51...
    > > (shortened)
    > >
    > >>Use modal dialogs for popups instead:
    > >>
    > >>window.showModalDialog(...) instead of
    > >>window.open(...)
    > >>
    > >>Modal dialogs are pretty much as regular windows, but you can't click on

    > >
    > > parent window while dialog
    > >
    > >>is open - it should work for you.
    > >>
    > >>Look here: msdn.microsoft.com/workshop/author/

    > >
    > > dhtml/reference/methods/showmodaldialog.asp
    > >
    > >>WYGL,
    > >>Andrey

    > >
    > >
    > > Andry,
    > >
    > > This does work, but is there a way of closing the dialog from a link

    rather
    > > than expecting an unsophisticated user to click on the control box 'X'?
    > >
    > > Rae MacLeman

    >
    > Rae,
    > Maybe i misunderstood you but what is the problem with closing a window?
    > In your dialog page you place a button:
    > <input type='button' value='Close Me!' onClick='window.close()'>
    > It does the trick!
    >
    > Is that what you need?
    > If you need something else, please explain and i'll try to help you
    >
    > WYGL,
    > Andrey


    Andry,

    My question arose because I'd been using ...

    <a href='javascript:window.close();'>Close Me</a>

    which doesn't work - yours does! Thank you

    Rae


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.773 / Virus Database: 520 - Release Date: 10/5/04
    webdev, Oct 7, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. thunk
    Replies:
    1
    Views:
    303
    thunk
    Mar 30, 2010
  2. thunk
    Replies:
    0
    Views:
    469
    thunk
    Apr 1, 2010
  3. thunk
    Replies:
    14
    Views:
    612
    thunk
    Apr 3, 2010
  4. Raffi
    Replies:
    2
    Views:
    111
    Grant Wagner
    Aug 20, 2004
  5. John Kotuby

    Keeping pop-up on top of parent window

    John Kotuby, Mar 22, 2007, in forum: Javascript
    Replies:
    4
    Views:
    170
    John Kotuby
    Mar 22, 2007
Loading...

Share This Page