Flash Games
 FAQ   Search   Memberlist   Usergroups   Register  Profile   Log in to check your private messages   Log in 


Is this form using only java to send emails?



 

Post new topic   Reply to topic  
   DEVPPL Forum Index -> JavaScript Forum
View previous topic :: View next topic  
Author Message
MusicManJP6



Joined: 23 Apr 2007
Posts: 12

PostPosted: Mon May 14, 2007 6:49 pm    Post subject: Is this form using only java to send emails? Reply with quote

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
View user's profile Send private message
LucasZ21
100+ Club


Joined: 26 Feb 2007
Posts: 195
Location: Mansfield, OH

PostPosted: Tue May 15, 2007 3:21 pm    Post subject: Re: Is this form using only java to send emails? Reply with quote

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
View user's profile Send private message Visit poster's website AIM Address
MusicManJP6



Joined: 23 Apr 2007
Posts: 12

PostPosted: Tue May 15, 2007 3:46 pm    Post subject: Re: Is this form using only java to send emails? Reply with quote

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
View user's profile Send private message
LucasZ21
100+ Club


Joined: 26 Feb 2007
Posts: 195
Location: Mansfield, OH

PostPosted: Tue May 15, 2007 4:57 pm    Post subject: Re: Is this form using only java to send emails? Reply with quote

I'm not too sure how they are sending the information...
Back to top
View user's profile Send private message Visit poster's website AIM Address
Display posts from previous:   
Post new topic   Reply to topic    DEVPPL Forum Index -> JavaScript Forum All times are GMT + 1 Hour
Page 1 of 1

 
 
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums.
Click here to Register

If you are a current member here on DEVPPL, please login below:

User: Pass:
Log me on automatically each visit:

 


Powered by phpBB © 2001, 2005 phpBB Group - Modified by DEVPPL

Flash Games - Sitemap