Click to See Complete Forum and Search --> : Newbie needs help with some scripts


cdsalis75
04-25-2003, 12:40 PM
I'm a javascript newbie. Okay, to be perfectly honest I'm a complete virgin. I need to write what I would consider a fairly complicated script so any advice, guidance, and direction will be greatly appreciated.

First of all, there's a series of 6 or 7 forms where a user enters information. After completing the first form, the data is submitted and the user is redirected to the next form in the sequence. What I would like to do is create some a script that if the user doesn't complete all 6 or 7 forms, when they return they are directed to the next form in the sequence. I guess the idea is to have some type of flag on each form that gets checked by the script and if the flag is on, the script redirects to the next form in the sequence. If the flag on form 2 is on, the user is redirected to form 3, and etc. All this would happen behind the scenes and appear somewhat transparent to the user.

Is this possible or am I completely off my rocker in thinking this can be done with javascript?

If it is possible, any ideas as to where I might be able to get some assistance?

Thanks in advance.

Jona
04-25-2003, 01:04 PM
You mean form validation? (http://javascript.internet.com/forms/basic-validation.html)

cdsalis75
04-25-2003, 02:21 PM
Not so much as a form validation in the way I understand 'form validation'. I have other scripts to validate the data being entered. What I'm looking to do is redirect the user to the next form in the sequence if a form has been completed. The forms are rather large, anywhere from 15-60 questions, so it's entirely possible for someone to stop halfway through the process.

An example would be, the user completes forms 1-3 but then must go make dinner so they shut down for the day. When they come back tomorrow, they resume completing the series of forms. Through a 'starting' page or link they access the series of forms, and instead of having to start over with form #1, they're automatically taken to form #4. I'm wondering if it's possible to do this with javascript.

Does that make sense? If not, please tell me and I'll try to explain it another way.

Thanks again.

Jona
04-25-2003, 02:25 PM
It's possible but you're gonna have a heck of a lot of cookies! ;) Try this link: http://javascript.internet.com/forms/ look and see if you can find something there that you can modify to suit your needs. There is also http://javascript.internet.com/cookies/ if you think that will also help you learn.