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
  • 19,333
  • 56
  • 202
  • 378

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,681
  • 8
  • 66
  • 64
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
  • 20,825
  • 13
  • 57
  • 71