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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post window.spawn.focus

    Hi... im having trouble with doing a popup window that will not reload.
    the deal is that i want a regular popup such as
    window.open('blabla','asd');
    and this new window has a button that sets window.opener.focus(), so it sends u back to the previous window...
    now IF i want to go back to the NEW window, how can i do that without reloading the page? i cant use window.open again, or is there a way to focus the window using the name defined?!
    thanks

  • #2
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Assign your popup to a variable (windowHandle) then have a link in the opener to refocus it


    myWin=window.open('blabla','asd');



    <a href="#null" onclick="myWin.focus()">Focus Popup</a>
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.

  • #3
    New to the CF scene
    Join Date
    Jul 2005
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts
    thats what im doing for now, but that stills reloads the "blabla" page... i dont want it to be reloaded

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    If its reloading the popup you cannot be doing as I suggested because

    <a href="#null" onclick="myWin.focus()">Focus Popup</a>

    only refocuses the popup

    Can you post all the code relating to the popup
    The silent one.

    The most dangerous thing in the world is an idea.
    The most dangerous person in the world is the one with an idea.


  •  

    Posting Permissions

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