View Full Version : specifying a variable in the URL?

08-26-2007, 11:34 PM
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-26-2007, 11:48 PM
nevermind, i figured out a solution to my problem using "location.hash"

08-26-2007, 11:49 PM
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)