Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can javascript output the url of a site?

Status
Not open for further replies.

nyc2001

Programmer
Jan 17, 2002
7
US
Is there a way to have a variable in javascript
that would display the url of the website?

Such as
Request.Servervariables("HTTP_HOST")

in active server pages?

Thanks
 
Are you looking for this?

javascript:alert(document.location)

HTH,

Quasibobo *** Don't eat yellow snow! ***
 
Thanks

Do you know how to turn this into a variable?

And get the url without the page.htm?

Or is that not supported?

Thanks a lot, I appreciate it
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top