PDA

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



Scarecoaster
01-19-2010, 08: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
01-19-2010, 08: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
01-19-2010, 10: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/