Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 questions: Validation before continue and how to combine two forms.

Status
Not open for further replies.

erigby

Programmer
Feb 14, 2005
6
US
Ok, I have 2 issues:

1. I have created a form that appears to be multiple pages, really I am using layer to show the user the different sections. What I would like to be able to do is have each layer validate before the user continues to the next layer. So I am thinking it would attach to the "continue" action. I 'm not sure how that would work though...here is the link to the form as it stands now.

[link=http://www.warnerpacific.edu/Admissions/forms/application.htm]Warner On-line Application[/url]

2. I would like to combine the current on-line application with our fee payment form so that it requires the user to pay the fee before they can submit their app. Here is how I think it would look:

user: fills out application and continues to next step
user: asked to pay fee
user: pays fee
computer: submits form to business office
user: continues to form submit
computer: confirms app infor
user: submit and form sent to admissions

So I know these are 2 very different questions...thank you for any light you can shed on my problems...

Richelle
 
1. Layers:
You can use javascript to make sure that they filled in something in all of the fields before continuing. This is a rather lengthy coding process (not a simple suggestion). Do you have any idea on what direction to take or do you need the entire feature coded?

2. Payment
You can achieve this by editing the payment and application script on the server. Some options include:
*) Making them pay first, and if successful, redirecting them to this page.
*) After they fill in the data, it is submitted to an edited version of the payment script. The script can then temporarily hold the information, let them pay, and then, if payment is successful, process the data like normal.

*) A less error proof method that you could use, would be to edit the results page/output/message that the user receives when they successfully make a payment. This edited page could contain javascript that sends a message back to the original window that it was successful (and thus, the data is ready to be submitted).
 
I'm fairly new to Javascript, so if you could point me to some scripts already written that I could addapt that would be helpful...

as for my second question, I understand what you are saying so I can figure that one out...thanks!

Richelle
 
Some basics (which you might already know):

To access form elements, I think you use something like the following:
document.forms.form_name.form_field.value
This will give you the value of individual form fields. It will work on most form field types, except for selection boxes in browsers like Firefox.

With this method, you can then check the data.

This page will be useful in notifying the user of the problem:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top