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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Frames

Status
Not open for further replies.

ahksar

Programmer
Jan 11, 2001
43
US
Hi,
I am using a web page with frames. I am writing a function for a visitor to email a friend the page URL. Since I use frames, the email function takes the URL of the parent window,which doesnt change,NOT the URL inner frame where the actual article is located.
I have used the code below,
script>document.write(&quot;<input type=\&quot;hidden\&quot; name=\&quot;url\&quot; value=\&quot;&quot; + opener.document.location.href + &quot;\&quot;>&quot;);</script>, and it worked fine in IE, but not Netscape.
So I tried <script>document.write(&quot;<input type=\&quot;hidden\&quot; name=\&quot;url\&quot; value=\&quot;&quot; + parent.location.href + &quot;\&quot;>&quot;);</script>,
but this again gives the URL of the parent frame, or in some cases, the URL of the page with the email.html file.
I am using CFMAIL to send out the email.
Could anyone help, as to get the URL of the inner frame...
Thanks
Ahksar

 
Why are you using opener? opener gives you the page from a which a new window was opened using window.open()?

parent gives you the frameset page - to get one of the frames use:

parent.frameName.document.location


I hope this is what you mean!
b2 - benbiddington@surf4nix.com
 
It's a difficult story for a simple answer!!!

I agree with Bangers a bit but I thought it was

parent.frames.framename.document.location

greetz Da Morpheus
 
ahksar--

Did you ever figure this problem out? I'm having a similar problem now.

Teresa
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top