SitePoint Sponsor

User Tag List

Results 1 to 8 of 8

Hybrid View

  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I'm pretty poor at Javascript, but does anyone have any ideas on how I can get a new browser window to open behind the current window when it is opened.

    Cheers for the help

  2. #2
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    D¨n ╔ideann, Alba
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Trusting that you know how to open a new window already (or, at least, you know how to do it in Dreamweaver) , then ...

    newWindow = window.open(blah, blah, blah) ;
    newWindow.blur();

    Ok.

  3. #3
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you could always go to a geocities website and see how they do it.



    Scot-Bot. You could also put the blur handler in the new window with an OnLoad right? But I guess that would make the window open in front and THEN move to the back right?
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  4. #4
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tried a geocities site:http://www.geocities.com/eweie/eweiesrampage.html

    Nothing looked to occur - can you post a URL to show me

    cheers

  5. #5
    SitePoint Enthusiast
    Join Date
    Feb 2001
    Location
    D¨n ╔ideann, Alba
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Correct, Creole, you wouldn't put the window.blur into an onLoad handler. Instead, it should reside in the function sued to open the new window.


  6. #6
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Using the open window feature and modifying it a bit


    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <script language="JavaScript">
    <!--
    function OpenWindow(theURL,winName,features) { //v2.0
    window.open(theURL,winName,features);
    window.focus();
    }
    //-->
    </script>



    </head>

    <body bgcolor="#FFFFFF" onLoad="OpenWindow('http://www.thesite.co.uk,'','')">
    </body>
    </html>

    Note - the focus(); - for some reason this seems to put the other window to the back, whereas blur() brings the other window to the front?????

    I've got this to work from a no frames page - but it doesn't work when put in a frameset. - do you know the reason for this??

    Any URLs that do this will be a help - cheers

  7. #7
    You talkin to me? Anarchos's Avatar
    Join Date
    Oct 2000
    Location
    Austin, TX
    Posts
    1,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Make it top.focus() or top.blur()

  8. #8
    SitePoint Evangelist
    Join Date
    Oct 2000
    Posts
    430
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well in a frameset it doesn't even open the window - any reason???


Bookmarks

Posting Permissions

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