Problem with keeping window on top

Discussion in 'JavaScript' started by Yanku, Oct 8, 2009.

  1. #1
    Hi All,

    I am opening window using following code :


    Code:
    <script>window.open('Results.aspx?sorttype=text&sort=OTName&sortname=Document&sortorder=ascending','Results','top=0,left=0,height=715,width=" & sRsultWindowSize & ",toolbar=no,status=yes,resizable=yes,scrollbars=no,location=no')</script>I want to keep new window top of the parent window.

    How can i achieve that ?

    Thanks for your help

    -John
     
    Yanku, Oct 8, 2009 IP
  2. navneetrai

    navneetrai Peon

    Messages:
    50
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    try calling <script>self.focus()</script> in the popup window
     
    navneetrai, Oct 10, 2009 IP
  3. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #3
    erm - in my humble opinion windows opened is not how you should work this. open a modal window / local "window" / div instead, even if it loads your results in an iframe or through ajax.
    that way, it is guaranteed to get its due attention and cannot be blocked by any software.

    for example, something like this: http://www.webtogs.co.uk/walk/ - click on rules or prizes links.
     
    dimitar christoff, Oct 10, 2009 IP