Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up child Window always on TOP

    Hi All,

    I am opening a popup window by clicking a link. It should be always on TOP. what shall i do ? I have tried alwaysRaised=1 like this by using window.open. But It doesn't work properly.

    Please assist me.....

    Thanks
    Saravanan.R

  • #2
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    Hi there.

    It would have been helpful if would have included your code so that we could help you out.

    anyway..here is a quick solution...which may be very different to what you had already written...

    Code:
    var newWindow = window.open( '','','scrollbars=yes,menubar=no,height=460,width=960,resizable=yes,toolbar=no,location=no,status=no');
    newWindow.document.write( "text in new window goes here" );
    newWindow.document.write( "text in new window goes here" );
    newWindow.document.write( "text in new window goes here" );
    newWindow.document.close();
    newWindow.focus(); // this should bring the focus
    Note..you should include the above script in a function...and call it when when you want the popup to appear. if you just dump it in a page as it is..it would just open the popup with every page refresh...not a lot people like that.

    good luck
    ess

  • #3
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thanks for quick reply ess.

    I have tried this code also. But it doesn't work.
    Actually my situation as follows,

    I have opened a child window childWin from parentWin. after that i can able to navigate entire site. But the childWin should be always on TOP. this is what i want

  • #4
    ess
    ess is offline
    Regular Coder
    Join Date
    Oct 2006
    Location
    United Kingdom
    Posts
    866
    Thanks
    7
    Thanked 30 Times in 29 Posts
    I see what you mean now...

    what about trying this out.

    newWindow.onblure = function() { newWindow.self.focus(); };

    hope that would do the trick.

    good luck.
    ess

  • #5
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    And why don't you use a modal window?

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #6
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,640
    Thanks
    0
    Thanked 649 Times in 639 Posts
    1. blur is not a standard window event and so not all browsers support it.
    2. modal windows only exist for Internet Explorer and for Firefox running on an intranet
    3. the only cross browser way to do it is within the same window using a lightbox script or similar.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •