943,754 Members | Top Members by Rank

Ad:
Jun 21st, 2008
0

Need help with form submission

Expand Post »
Hello,
I am designing my website and I want people visiting my site to be able to submit a form. However, if they submit a form, I would like to require certain information to be submitted. I got a script from Dynamic Drive that is supposed to do that but here is the problem. Inside the form tag it has this code-"form name="formcheck" onsubmit="return formCheck(this); " As you can see, there is not a "Action" or "Method" shown. So can someone tell me what I will need to do to cause this script, if form validation occurs, to send me the info from form in an E-Mail.
Thank you.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
trouble706 is offline Offline
1 posts
since Jun 2008
Jun 23rd, 2008
0

Re: Need help with form submission

That might depend on whether u are running client or server side script, coz what I know is, u use the action attribute when u want to run a servicing program when the user submits the form on web server, so what u actually do is have the ff code action="The name of ur servicing program
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008
Jun 24th, 2008
0

Re: Need help with form submission

Hey

HTML Syntax (Toggle Plain Text)
  1. <form name="formcheck" onsubmit="return formCheck(this);">

that means when form is submitted javascript function: formCheck(this) function is called.

In this function all the validation should be done before sending it to server.
Reputation Points: 83
Solved Threads: 61
Posting Pro in Training
Luckychap is offline Offline
442 posts
since Aug 2006
Jun 24th, 2008
0

Re: Need help with form submission

As Luckychap has mentioned, validations should be done in the function formCheck. If you have an action specified (eg. action="test.php"), it will then go to the test.php if formCheck returns true. If the function returns false, it will remain in the same page.
Moderator
Featured Poster
Reputation Points: 524
Solved Threads: 356
Purple hazed!
nav33n is offline Offline
3,878 posts
since Nov 2007
Jun 24th, 2008
0

Re: Need help with form submission

Click to Expand / Collapse  Quote originally posted by trouble706 ...
Hello,
I am designing my website and I want people visiting my site to be able to submit a form. However, if they submit a form, I would like to require certain information to be submitted. I got a script from Dynamic Drive that is supposed to do that but here is the problem. Inside the form tag it has this code-"form name="formcheck" onsubmit="return formCheck(this); " As you can see, there is not a "Action" or "Method" shown. So can someone tell me what I will need to do to cause this script, if form validation occurs, to send me the info from form in an E-Mail.
Thank you.

Can you provide additional code for your form?
mgt
Reputation Points: 8
Solved Threads: 0
Light Poster
mgt is offline Offline
28 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Help: Website Login and Protect Content
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: Storing a selected item into a global variable





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC