I just ran into this problem myself.  I found a script on irt.org and
modified it appropriately...

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function openhelp(aanchor) {
    if (!window.helpwindow) {
        // has not yet been defined
        helpwindow = window.open ("store_help.htm#" + aanchor + "",
"storehelp", "height=350, width=340, scrollbars=yes");
    }
    else {
        // has been defined
        if (!helpwindow .closed) {
            // still open
            helpwindow = window.open ("store_help.htm#" + aanchor + "",
"storehelp", "height=350, width=340, scrollbars=yes");
            window2.focus();
        }
        else {
            helpwindow = window.open ("store_help.htm#" + aanchor + "",
"storehelp", "height=350, width=340, scrollbars=yes");
        }
    }
}
//-->
</SCRIPT>

I think the last else statement is extraneous, but it doesn't seem to be
hurting anything...

HTH,

Jeff Garza
Webmaster/Lead Developer
Spectrum Astro, Inc.
[EMAIL PROTECTED]

-----Original Message-----
From: Gonzo Rock
To: CF-Talk
Sent: 12/12/01 9:15 PM
Subject: RE: PopUp Problem

Yes Marcus it does have the onload="window.focus()" in the body section.
The problem is that a user click that references the SAME DOCUMENT with
a different anchor ... ie somedoc.html#someanchor does not fire the
onload=window.focus() routine. 

Am I being clear?
Sure hope so.
Gonzo


>Perhaps a silly question, but does your second document, the one that
your
>trying to load in the named window, have the onload="window.focus()"
>statement in it?
>
>Since your reloading the page, the window will process again, and needs
it.
>
>Marcus
>
>> -----Original Message-----
>> From: Gonzo Rock [mailto:[EMAIL PROTECTED]]
>> Sent: Wednesday, December 12, 2001 5:14 PM
>> To: CF-Talk
>> Subject: PopUp Problem
>>
>>
>> I'm still having trouble with PopUp browser windows... have read
>> lots of docs but not quite finding what I need.
>>
>> Specifically my problem is getting a PopUp that has been named
>> and used previously to receive the focus when again called. The
>> called document has a
>> <body onload="window.focus()">
>> statement in it.
>>
>> For example:
>> TheHelpDoc = SomeName.html#SomeAnchor
>>
>> <a href="#TheHelpDoc#" target="help_win">Click4Help</a>
>>
>> works great the first time it is called.
>>
>> If it is called a second time with some NEW Document name it WILL
>> bring the NEW Document into focus... (pop to the top).
>>
>> HOWEVER if the SameDocument but a DifferentAnchor is called it
>> will bring the document to the new anchor BUT it will NOT bring
>> the help_win into focus.
>>
>> It seems that the onload="window.focus()" does not fire the
>> second time around when the anchor tag is involved.
>> 
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to