Page 1 of 1

Get Page address from within iFrame

Posted: Sat Jun 26, 2004 4:35 am
by IrakliG
Hi all,

I have a html page - test1.htm which has an iframe in it and in some case it showes scr="test1.php"
In the Test1.PHP I need to get address of the current page in this example test1.htm
How??????

Posted: Sat Jun 26, 2004 5:49 am
by patrikG
Moved to client-side.

Try Javascript: alert(top.location.href);

Posted: Sat Jun 26, 2004 10:36 am
by jollyjumper
or parent.document.location if the iframe element is in the test1.html file.