By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,576 Members | 1,360 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,576 IT Pros & Developers. It's quick & easy.

parent's url ? how to...

P: n/a
Mel
i have a main page with an iframe inside it

from iframe's code, i need to know the URL of the parent

can someone help please

PS:- How can i get the URL of the main window (i guess _top)

thanks
Jul 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Mel wrote:
i have a main page with an iframe inside it

from iframe's code, i need to know the URL of the parent

can someone help please

PS:- How can i get the URL of the main window (i guess _top)

thanks


Hi,

did you try parent.window.location ?

If you need to go up 2 levels: parent.parent.etc

if you need to traverse to another frame try:
parent.frames["someframename"].location

You can also access JS-routines on other pages that way.

However, there are some securityrestrictions.
If one of the frames comes from another domain, you will find you cannot
access what you want.

Hope this helps.
Regards,
Erwin Moller.
Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.