Passing Parameters Via Query Strings
3. Read Querystrings
The only other thing that we need to do is to initialize entries in the array for the fields that we want the page to process and to actually call the azbove function to retrieve the values. If we are adding the code to the top of the purchases page then we are expecting code and desc fields to be passed from the previous page. Of course the purchases page may be reached without values for these fields being selected so we need to assign default values to the fields before we call the function to load them with the passed values. Here is the code that does this for us. This code also goes into the head section of our page.
qsParm['desc'] = null;
document.write('You selected' + qsParm['code']
+ ' : ' + qsParm['desc']);