Debt Consolidation - Debt Consolidation - Watch Anime - Debt Consolidation - Debt Consolidation

PDA

View Full Version : javascript and querystrings


relixx
Aug 10th 2005, 5:52 am
Is it possible to access querystring variables with javascript like you can with ASP/PHP/etc?

anotherchancetosee
Aug 10th 2005, 6:15 am
Is it possible to access querystring variables with javascript like you can with ASP/PHP/etc?
Absolutely, you just need to do a bit of Javascript text parsing to pluck them from the URL. I use something like it to pass latitutde and longitude to my Google Maps code for http://racingcircuits.blogspot.com

J.D.
Aug 10th 2005, 6:53 am
Is it possible to access querystring variables with javascript like you can with ASP/PHP/etc?Use document.location.search to get the search argument string and then parse it (i.e. look for the & and = characters) to break it onto individual arguments.

J.D.