Click to See Complete Forum and Search --> : form help


krismisz
02-02-2003, 11:34 PM
Hi! So I posted a message a little while ago and I didn't get anywhere. I'm going to try again.

I wanted to have a form that would allow visitors to go to different pages based on their input information (their score, really...it's a questionnaire). I have the entire form made, I just don't know how to make it do what I want.

Do I use if statements? How do I do this? Any help with this would be great!

Thanks!
krismisz

khalidali63
02-03-2003, 12:24 AM
typically what you want to do will be done like this.

say you have all the data from the form and user wants to go to "New registration pages"
in a variable you have the new registration pages url
url = "new-reg.html"
now you want to redirect user to this address

say if( url!=""){
document.location.href = url;
}

this will load the registration page in the same window.

hope this helps

cheers

Khalid

krismisz
02-03-2003, 06:30 PM
I don't think I explained myself correctly...sorry about that.

I have a questionaire on my site (it's not up yet, so I can't give you the address), that goes to a different page depending on their score. (ie if their score is between 9-12, they go to page "A", if it's between 13-17, they go to page "B", etc.)

Do I use "if" statements for this? I'm a beginner so, although I can make forms just fine, I'm not sure how to make it do this.

Thanks!
krismisz

krismisz
02-04-2003, 06:20 PM
Dave, thanks so much! But would it be simpler to do a "mostly a's" or "mostly b's" type thing? Is this done similarly?

krismisz

krismisz
02-04-2003, 07:18 PM
Is it possible to do it if there's say, 8 categories?

krismisz
02-04-2003, 07:22 PM
Here's a quick outline of how the survey would go:

Question One

a. Answer A
b. Answer B
c. Answer C
d. Answer D
e. Answer E
f. Answer F
g. Answer G
h. Answer H

Is there a way to calculate which letter was chosen most often? Mostly a's, mostly b's type thing?

krismisz
02-04-2003, 08:20 PM
...and then loop through the array...

Is there a website I can go to to learn more about this, or can you offer me any helpful tidbits?

And thank you so much for helping me out with this! At least now I know it's possible!

khalidali63
02-04-2003, 08:42 PM
One of my fav's several yrs back was this link.

http://www.htmlgoodies.com/primers/jsp/jsp_toc.html

cheers

Khalid

krismisz
02-05-2003, 09:15 PM
Thanks so much Dave for all of your help! I really appreciate you taking the time to help a beginner! Thanks again!

krismisz