Posted by Aaron | Posted in Flex, HTML, JavaScript, Opinion | Posted on 26-02-2009
I have had several people ask me how to get URL QueryString values in JavaScript, so I created a function that will take a string, find the matching QueryString key, and return the value associated with that key. Enjoy!
NOTE: You may have to remove and re-type the “s from the code below if you copy it from this page. Some of them don’t come through correctly when you paste into your dev application.
Let's pretend the URL of this page is http://www.noobflash.com/foo/index.html?noob=someValue. The code above will find the first QueryString instance of "noob" in the URL and return the "someValue" portion to be used in your code. You would simply type queryStringValue("stringToFind") whenever you would like to get new QueryString data.
Related posts:




Good Job
Thanks a lot for this good work!
Cheers!
This page is useful to me. Thanks a lot.
Thanks good one
Hi, need your help to open below notepad file as a prepopulated mail window, whenever i add file url after noob. like below example.
http://www.noobflash.com/foo/index.html?noob=http://www.website/sites/doclibrary/someValue.txt
Also i dont want to add any script under notepade file, just a simple text, like below
mailto:rathore.s.2@gmail.com?CC=rathore.s.2@gmail.com&Subject=This%20is%20teat%20mail&Body=Hi%20Team%2C%0D%0A%0D%0AThis%20is%20Testmail.%0D%0A%0D%0A%0D%0AThanks%2C%0D%0AShail
Please help.