----- Original Message ----- From: "Ross Clutterbuck" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 07 January 2003 22:42 Subject: [wdvltalk] Re: Setting focus to existing pop-up window
> > use w=window.open() and save the reference in > > w. Then you can use w.focus() or w.close() etc > > That's what I've been doing, but it's not working... > > How about a code sample so I can compare, BJ? Have a look at http://www.designeire.com with the browser maximized. If you choose the 'portfolio' page, clicking on one of the slides like "Web design" opens up a popup window containing sample sites. Click somewhere back in the main window and the popup disappears behind it. Now click on another slide, the popup gets the focus and reappears in front of the main window. The code for that is what I put in my earlier message, do a View Source on the portfolio.asp page and you'll see the function openGallery() right at the top, which opens the popup window if not already open and then sets focus to it. Maybe you need to include the code to (re)open the window to get a valid reference to it before giving it the focus? I just noticed something... if you click a slide you see the popup. Hide it and click another and you see the popup. Click the first one again and you see the popup. Click the same one twice and you break the spell, at some point the window no longer gets the focus and stays hidden whatever you click. Close it and you can start again. I wonder if this is some kind of browser cache behaviour? I tried putting a ? after the URL but still each slide only works once or twice. Sometimes I wonder why we bother. Then I remember, if it was easy they wouldn't pay us to do it. Bj ____ � The WDVL Discussion List from WDVL.COM � ____ To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED] Send Your Posts To: [EMAIL PROTECTED] To change subscription settings to the wdvltalk digest version: http://wdvl.internet.com/WDVL/Forum/#sub ________________ http://www.wdvl.com _______________________ You are currently subscribed to wdvltalk as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
