PDA

View Full Version : Code that determines that path of the page it's on?



Scarecoaster
January 19th, 2010, 07:26 PM
Is this possible?

Let me clarify: I need a way for a html page or something similar be able to determine what it's full path is. It must self-determine this. Can javascript help me with this? Any recommendations of what route I should take to figure this out?

Thanks!

Philip M
January 19th, 2010, 07:29 PM
document.write (location.href);

All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

harrierdh
January 19th, 2010, 09:43 PM
Here is a link with more information on the location object in Javascript.

http://www.elated.com/articles/using-javascripts-location-object-to-work-with-urls/