> Try dropping "window" from "window.opener.location.href" -  I think you 
> just
> need "opener.location.href".

Just to clarify, I think this is because "opener" is its own top-level 
object, a sibling of "window" rather than a child.  If you have "window" 
there, it will look for "opener" in the current window rather than at the 
top level.  Not sure if I have the nomenclature correct but you get the 
idea.

Also what Charlie said is true, you have to use "window.open" when you open 
your window originally.

-- Josh

----- Original Message ----- 
From: "Josh Nathanson" <[EMAIL PROTECTED]>
To: "CF-Talk" <[email protected]>
Sent: Thursday, April 05, 2007 9:58 AM
Subject: Re: JS Issue


> Try dropping "window" from "window.opener.location.href" -  I think you 
> just
> need "opener.location.href".
>
> -- Josh
>
>
> ----- Original Message ----- 
> From: "Bruce Sorge" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[email protected]>
> Sent: Thursday, April 05, 2007 9:42 AM
> Subject: SOT: JS Issue
>
>
>>I have a very simple piece of JS:
>>
>> <SCRIPT language=JavaScript>
>> <!--
>> function win(){
>> window.opener.location.href="AddCandidate.cfm";
>> self.close();
>> //-->
>> }
>> </SCRIPT>
>>
>> When I click on the button with the onClick event:
>>
>> <input type="button" name="back" value="Back To Previous Page"
>> onClick="win();" />
>>
>> I get the message window.opener.location is null or not an object.
>>
>> I also tried to put single quotes on the window.opener
>> ('AddCandidate.cfm').
>>
>> I googled it and the answers I found did not seem to help.
>>
>> Thanks,
>>
>> -- 
>> Bruce Sorge
>>
>> "I'm a mawg: half man, half dog. I'm my own best friend!"
>>
>>
>>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion MX7 and Flex 2 
Build sales & marketing dashboard RIA’s for your business. Upgrade now
http://www.adobe.com/products/coldfusion/flex2?sdid=RVJT

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274624
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to