| View previous topic :: View next topic |
| Author |
Message |
MusicManJP6

Joined: 23 Apr 2007 Posts: 12
|
Posted: Mon May 14, 2007 6:49 pm Post subject: Is this form using only java to send emails? |
|
|
The form located here:
http://www.wawa.com/customerrelations/cr-home.asp
Seems to be using javascript for validation. But what are they using to send the form? A customer really liked this form and they wanted to use something similar on their site. Problem is, I don't know how they are sending the form when submit is pressed. I HAVE to have the ability to send to a different recipient depending on the category selected. Can anyone fill in the holes for me? I am confused.
Thanks,
Adam (MusicManJP6) |
|
| Back to top |
|
 |
|
|
LucasZ21 100+ Club

Joined: 26 Feb 2007 Posts: 195 Location: Mansfield, OH
|
Posted: Tue May 15, 2007 3:21 pm Post subject: Re: Is this form using only java to send emails? |
|
|
| Code: |
| <button onclick="validateForm(document.contactform);">Submit This Form</button> |
That is the code behind their button. It calls the very first function.
| Code: |
<script language="JAVASCRIPT">
function validateForm(passedForm) {
var retVal;
passedForm.First.required = true;
passedForm.Last.required = true;
passedForm.Category.required = true;
passedForm.ContactedBefore.required = true;
passedForm.Email.required = true;
passedForm.StoreAddress.required = true;
passedForm.StoreCity.required = true;
passedForm.StoreState.required = true;
passedForm.StoreLandmark.required = true;
passedForm.StoreDateTime.required = true;
passedForm.ContactedBefore.required = true;
passedForm.Address1.required = true;
passedForm.City.required = true;
passedForm.State.required = true;
passedForm.Zip.required = true;
passedForm.Email.inputType = 'email';
passedForm.Zip.inputType = 'zip';
retVal = formCheck(passedForm);
if (retVal) {
retVal = confirm("Are you sure you want to submit this form?");
}
if (retVal) {
if (passedForm.Submit) {
return retVal;
}
else {
passedForm.submit();
}
} else {
return retVal;
}
}
</script> |
So when the user clicks submit, it will check to see if all the required fields are filled in.
Then IF they are, it will run "passsedForm.submit()"
I think, hope I helped! |
|
| Back to top |
|
 |
MusicManJP6

Joined: 23 Apr 2007 Posts: 12
|
Posted: Tue May 15, 2007 3:46 pm Post subject: Re: Is this form using only java to send emails? |
|
|
| That is what I was thinking as well. BUT, how is that actually doing anything? Or i guess a better question is, HOW is it sending the info? I think I may have found a way to do it using ASP, but am curious how they are sending the form still! |
|
| Back to top |
|
 |
LucasZ21 100+ Club

Joined: 26 Feb 2007 Posts: 195 Location: Mansfield, OH
|
Posted: Tue May 15, 2007 4:57 pm Post subject: Re: Is this form using only java to send emails? |
|
|
| I'm not too sure how they are sending the information... |
|
| Back to top |
|
 |
|