If you are opening into a file you have control over, simply put the focus into that script, not from opener.
Putting self.focus() in the head of the opened file will 'always' focus itself when re-loaded. Brett Payne-Rhodes <[EMAIL PROTECTED]> said: > I've never had much luck in (confidently) getting Javascript code to > 'refresh' without closing browser windows and re-opening them. If > someone has a way I'd be keen to hear it... > > B) > > Scott Thornton wrote: > > Hi, > > > > I tried that... > > > > For some reason that didn't work yesterday... today it does. > > > > I hate javascript. > > > > > > > > > >>>>[EMAIL PROTECTED] 27/10/2004 2:53:27 pm >>> > >>> > > If you givr the window a name i.e. > > > > var newWin = open(...) > > > > you should be able to do the following > > > > newWin.focus(); > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] Behalf Of Scott > > Thornton > > Sent: Wednesday, 27 October 2004 2:36 PM > > To: CFAussie Mailing List > > Subject: [cfaussie] OT: Javascript: Focus the new window > > > > > > Hi, > > > > I am opening a new window ( a login window with back/forward buttons) > > from a websites' default page. > > > > Problem is, the new login window does not receive the focus. > > > > <SCRIPT language="javascript"> > > function openLoginWindow() > > { > > var loginwindow; > > loginwindow = > > window.open("Password/sb_password.cfm","LoginWindow", "fullscreen=no, > > location=1, scrollbars=1, resizable=1"); > > > > } > > </SCRIPT> > > > > > > <body onLoad="javascript: openLoginWindow();"> > > > > Funny thing is: > > > > I had tried to close the calling window with window.close(); after > > opening the new one. This actually caused the new login window to have > > focus, and behind it was browser error message asking the user to > > click > > yes or no to close the browser window. > > > > Can someone help with: > > 1. Open a new window that has focus, and close the old calling window > > without user prompts? > > Or > > 2. Or just open a new window that has the focus? > > > > Cheers, > > > > > > > > Scott Thornton, Programmer > > Application Development > > Information Services and Telecommunications > > Hunter-New England Area Health Service > > Phone JHH +61 2 49214193 RNH +61 2 49236078 > > Fax +61 2 49214191 > > > > [EMAIL PROTECTED] > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > > > > > > > Please Note: > > > > This communication has been sent on behalf of The Royal Automobile Club > > of > > Queensland Limited (RACQ). The information contained in this > > communication > > may be privileged and confidential. If you are not the intended > > recipient, > > any use, disclosure or copying of this communication is expressly > > prohibited. If you have received this communication in error, please > > delete > > it immediately. RACQ and its associated entities do not warrant or > > represent that this communication (including any enclosed files) is > > free > > from electronic viruses, faults or defects. > > > > If this is a commercial electronic message within the meaning of the > > Spam > > Act(2003), you may indicate that you do not wish to receive any further > > > > commercial electronic messages from RACQ by sending an e-mail to > > [EMAIL PROTECTED] with your details or by contacting RACQ on > > 131905 > > > > > > > > --- > > You are currently subscribed to cfaussie as: > > [EMAIL PROTECTED] > > To unsubscribe send a blank email to > > [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > --- > > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > > To unsubscribe send a blank email to leave-cfaussie- [EMAIL PROTECTED] > > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > > > > -- > Brett Payne-Rhodes > Eaglehawk Computing > t: +61 (0)8 9371-0471 > f: +61 (0)8 9371-0470 > m: +61 (0)414 371 047 > e: [EMAIL PROTECTED] > w: www.ehc.net.au > > > --- > You are currently subscribed to cfaussie as: [EMAIL PROTECTED] > To unsubscribe send a blank email to leave-cfaussie- [EMAIL PROTECTED] > Aussie Macromedia Developers: http://lists.daemon.com.au/ > > -- --- You are currently subscribed to cfaussie as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] Aussie Macromedia Developers: http://lists.daemon.com.au/
