Click to See Complete Forum and Search --> : Getting information from a url into an array


jc021179
10-29-2003, 01:28 PM
I am real newbie to javascript. I have to design a small 5 question quiz using html / javascript.

What i have got so far is at http://clubley.hopto.org
the way i have designed it after a question is answered the users response is added to the url. So after all five questions the url looks like this:

http://results.htm?q1answer=1&q2answer=2&q3answer=0&q4answer=1&q5answer=2

i need a script that will prefrebly assign variables q1answer, q2answer..... and store the response in them or create an array say answers[0] to answers [4].

I know there are lots of examples of this on the net but i cant make sense of them.

if somebody could do this for me it would b a great help.

THANKS
THANKS

Jeff Mott
10-29-2003, 03:27 PM
162208

var qs = new ParsedQueryString();
alert( qs.param('q1answer') );

agminer
10-29-2003, 05:16 PM
In the java text by thau he used frames with a hidden window to store info in the hidden page and then retrieve it later. Don't remember how it was done just that it was.