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

Form auto submit

Status
Not open for further replies.

boatguy

Programmer
Oct 22, 2001
153
US
Hi,

I have a 4 step form (4 pages).
Step 1 Identifies the customer by querying a customer dB using a variable passed in the url, posts the contact information is several form fields and asks them to update the information.

Step 2 basically asks the customer if they will or will not be storing their boat with this particular dealership and has several other fields asking for dates like when they will be finished boating, when they would like their boat pulled out of the water etc.

Step 3 asks the customer to select the type of storage they are interested in...here's my problem. If the customer selects that they are not storing in step 2, I need to skip step 3, but I still need to pass form data captured in step 1 and 2.

So, on step 3 I added and if statement
Code:
<cfif form.dont_store IS "yes"> <body onLoad="document.step3.submit()">
<cfelse>
<body>
</cfif>

It doesn't submit the form!!! Any other suggestions as to how to auto submit or does anyone see anything wrong with this method?

Thanks
 
try to give your form an ID and use
Code:
document.getElementById('yourID').submit();

=========================================
Don't sweat the petty things and don't pet the sweaty things.
 
also, switch your IS to EQ - i always have problems with is and is not. EQ and NEQ always work fine

=========================================
Don't sweat the petty things and don't pet the sweaty things.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top