parent's url ? how to...

M

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
 
E

Erwin Moller

Mel said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top