question about window.showModelessDialog()

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

    #1

    question about window.showModelessDialog()

    Hi, all

    When I use window.showMode lessDialog() to open a window. And then on the
    opened window to open an another window with the same function,
    window.showMode lessDialog(). The last opened one is always on the top of the
    first opened one. Is there any "work around" to have the first opened one go
    to the front? Thanks in advance!

    Jack


  • Grant Wagner

    #2
    Re: question about window.showMode lessDialog()

    datactrl wrote:
    [color=blue]
    > Hi, all
    >
    > When I use window.showMode lessDialog() to open a window. And then on the
    > opened window to open an another window with the same function,
    > window.showMode lessDialog(). The last opened one is always on the top of the
    > first opened one. Is there any "work around" to have the first opened one go
    > to the front? Thanks in advance!
    >
    > Jack[/color]

    window.showMode lessDialog() returns a window object reference that appears to
    respond to the standard window object interface, for example:

    var w1 = window.showMode lessDialog('htt p://www.microsoft.c om');
    var w2 = window.showMode lessDialog('htt p://www.yahoo.com') ;
    w1.focus();

    appears to work correctly. So perhaps after you open the 2nd modeless dialog,
    call window.focus() on the initial modeless dialog to pull focus back to it.
    Untested.

    --
    Grant Wagner <gwagner@agrico reunited.com>
    comp.lang.javas cript FAQ - http://jibbering.com/faq

    Comment

    • datactrl

      #3
      Re: question about window.showMode lessDialog()

      Thanks, Grant

      The case is there are 3 windows. window 1 uses window.showMode lessDialog()
      to open window 2 and window 2 uses window.showMode lessDialog() to open
      window 3. The window 3 will be on focus after all. Then when I click window
      2, window 2 is on focus, but it is always behind window 3. It can't go on
      top of window 2 even when it is on focus.

      Jack
      [color=blue]
      > window.showMode lessDialog() returns a window object reference that appears[/color]
      to[color=blue]
      > respond to the standard window object interface, for example:
      >
      > var w1 = window.showMode lessDialog('htt p://www.microsoft.c om');
      > var w2 = window.showMode lessDialog('htt p://www.yahoo.com') ;
      > w1.focus();
      >
      > appears to work correctly. So perhaps after you open the 2nd modeless[/color]
      dialog,[color=blue]
      > call window.focus() on the initial modeless dialog to pull focus back to[/color]
      it.[color=blue]
      > Untested.
      >
      > --
      > Grant Wagner <gwagner@agrico reunited.com>
      > comp.lang.javas cript FAQ - http://jibbering.com/faq
      >[/color]


      Comment

      • Fred Oz

        #4
        Re: question about window.showMode lessDialog()

        datactrl wrote:[color=blue]
        > Thanks, Grant
        >
        > The case is there are 3 windows. window 1 uses window.showMode lessDialog()
        > to open window 2 and window 2 uses window.showMode lessDialog() to open
        > window 3. The window 3 will be on focus after all. Then when I click window
        > 2, window 2 is on focus, but it is always behind window 3. It can't go on
        > top of window 2 even when it is on focus.[/color]
        [snip]

        showModalDialog was introduced with IE 4, showModelessDia log with IE 5.
        AFAIK, no other browser supports them - so for those users, the above
        is not an issue since nothing will happen when you try to execute the
        function.

        Please consider using some other method to achieve what you are after,
        or at least use feature detection and warn users of non-IE UAs.

        Cheers, Fred.

        Comment

        Working...