View Full Version : specifying a variable in the URL?

08-27-2007, 12:34 AM
I know that using php and asp you can specify a variable in a url (ie. page.asp?variable=value). Being new to web design I was wondering if asp and php were the only way you can do that or if it's possible to specify a variable in the URL for an HTML page and then reference it somehow in a javascript?

08-27-2007, 12:48 AM
nevermind, i figured out a solution to my problem using "location.hash"

08-27-2007, 12:49 AM
You can get the query sting in Javascript using the 'search' property of the location object
DevGuru :: search (http://www.devguru.com/Technologies/ecmascript/quickref/location_search.html)