PDA

Click to See Complete Forum and Search --> : Get my current URL [RESOLVED]


JCScoobyRS
Nov 18th, 2002, 11:28 AM
I need to be able to get the current URL of my page and store it to a variable. Can someone help me? Thanks, Jeremy

Ex: "http://localhost/StarWeb" I need to get that string and store it in a variable so that I can create dynamic links to webpages.

RealisticGraphics
Nov 18th, 2002, 06:02 PM
Here you go:


var CurURL = location.href
alert(CurURL)

JCScoobyRS
Nov 20th, 2002, 04:09 PM
Thanks, works like a charm.