0

Possible Duplicate:
How do I get the current location of an iframe?

Hi i want to get the complete URL, and with the methods i know i get the full url but of the iframe, and i want the 'final' document.location.href,

how can i get it?

i don't care if its php or js, but i'm guessing by my experiments that with PHp it's not possible...

Community
  • 1
  • 1
Toni Michel Caubet
  • 18,208
  • 50
  • 194
  • 356

2 Answers2

1

If you want to know where you currently are:

  • Client side - javascript - you can use alert(window.location).
  • Server side - php - .$_SERVER["REQUEST_URI"] or $_SERVER['PATH_INFO'] depending on what you want.
The Scrum Meister
  • 29,113
  • 8
  • 64
  • 63
0

Take a look at the top answer from this question.

It's important to note that it's (luckily!) not possible to get the URL of an iframe if the iframe's URL is from a different domain than the parent page. If you're trying to do that, you're probably out of luck.

Community
  • 1
  • 1
ClosureCowboy
  • 19,889
  • 13
  • 56
  • 70