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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

multi-page HTML form that posts to the URL and validates

Status
Not open for further replies.
Apr 9, 2002
3
CA
Hi

I am attempting to create a multi-page HTML form that posts the results of the first form to the URL, which in turn is picked up by the second form. I have created two separate functions that work properly for both of these purposes. I can get the form to validate or POST the information to the URL, but not both.

I am using a regular button, rather than a submit button to call the function that posts the information, but the validate function is normally called by a submit button and I keep getting errors and the form won't submit. The validate function normally returns a boolean value when the form is submitted and pops up with alerts if any of the fields are filled in correctly.

This form will be submitted using the formmail.pl script from Matt Wright

I hope this is enough information to effectivley illustrate my problem. If anyone can help me, it would be appreciated. If you need more information regarding this problem, please let me know. Thank you...

Marty Harris

P.S.

Here is the function that POST's the information from the first form to the URL:

function sendit()
{
fname=escape(document.nuheatDist1.realname.value);
lname=escape(document.nuheatDist1.TXTLastName.value);
company=escape(document.nuheatDist1.TXTCompanyName.value);
address=escape(document.nuheatDist1.TXTaddress1.value);
city=escape(document.nuheatDist1.TXTcity.value);
state=escape(document.nuheatDist1.TXTstate.value);
zip=escape(document.nuheatDist1.TXTzipCode.value);
country=escape(document.nuheatDist1.CBOcountry.value);
phone=escape(document.nuheatDist1.TXTphone.value);
fax=escape(document.nuheatDist1.TXTfax.value);
email=escape(document.nuheatDist1.email.value);
contact=escape(document.nuheatDist1.RADcontact.value);
setupDist=escape(document.nuheatDist1.RADsetupDist.value);
receive1=escape(document.nuheatDist1.CHKreceive1.value);
receive2=escape(document.nuheatDist1.CHKreceive2.value);
comments=escape(document.nuheatDist1.TXTAcomments.value);
location='distributorForm2.htm' + '?' + fname + '&' + lname + '&' + company + '&' + address + '&' + city + '&' + state + '&' + zip + '&' + country + '&' + phone + '&' + fax + '&' + email + '&' + contact + '&' + setupDist + '&' + receive1 + '&' + receive2 + '&' + comments;
}


 
I may not be following correctly but if all you need to do is submit both pages values then for your button in the first page jsut have the Value="Continue" while it actually post's the values and then go on to the second page and submit the rest. Am I there or way off from the problem provide tools to let people become their best.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top