Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CFMAIL to refer a page

Status
Not open for further replies.

ahksar

Programmer
Jan 11, 2001
43
US
Hi,
I am using <CFMAIL> to enable a user to send an email, or recommend , the page he is visiting to a friend.
I used the below code to get the inner frame
<script>document.write(&quot;<input type=\&quot;hidden\&quot; name=\&quot;url\&quot; value=\&quot;&quot; + opener.document.location.href + &quot;\&quot;>&quot;);</script>. It works fine with IE, but not with with Netscape. The URL that gets passed is the email page URL, not the URL of the referring document. Anyway of overcoming this?
Thanks in advance
ahksar
 
Hey ahksar,

Just change &quot;opener.document&quot; to &quot;parent&quot; and it should work.

<script>document.write(&quot;<input type=\&quot;hidden\&quot; name=\&quot;url\&quot; value=\&quot;&quot; + parent.location.href + &quot;\&quot;>&quot;);</script>

Let me know if you still have problems with it,
GJ
 
Gunjack,
Thanks for your earlier help and code. I did try this out, but it does not pull the URL of the inner frame, it still gives the URL of the location bar.
Thanks
ahksar
 
Strange, I tested it in IE &amp; Netscape without any problems. What browser version are you having trouble with?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top