| | |
Need help with form submission
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jun 2008
Posts: 1
Reputation:
Solved Threads: 0
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.
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.
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 Some people get so rich they lose all respect for humanity. That's how rich I want to be.
Hey
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.
HTML Syntax (Toggle Plain Text)
<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.
When you think you have done a lot, then be ready for YOUR downfall.
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.
Ignorance is definitely not bliss!
*PM asking for help will be ignored*
*PM asking for help will be ignored*
•
•
Join Date: Jun 2008
Posts: 11
Reputation:
Solved Threads: 0
•
•
•
•
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?
![]() |
Similar Threads
- setting up an automatic email reply from a form. (Site Layout and Usability)
- Automatic email reply to Form (Site Layout and Usability)
- Help with asp form will not display contact information (ASP)
- form validation_valkue retaining and changing the color of the labe not entered (HTML and CSS)
- Problems in Dynaform (Form Mail) URGENT HELP (PHP)
- multiple recipients on FP form submission (HTML and CSS)
- Changing the page after a form (HTML and CSS)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Help: Website Login and Protect Content
- Next Thread: Storing a selected item into a global variable
| Thread Tools | Search this Thread |
acid2 ajax ajaxexample ajaxjspservlets array browser bug captchaformproblem cart checkbox child class close codes createrange() css cursor date debugger decimal dependent design disablefirebug dom dropdown editor element embed engine enter error events explorer ext file firefox focus form forms frameworks getselection google gxt hiddenvalue highlightedword hint html ie7 ie8 iframe images index internet java javascript javascripthelp2020 jquery jsf jsfile jsp jump libcurl listbox maps masterpage math media menu mp4 object onmouseoutdivproblem onmouseover onreadystatechange parent paypal pdf php position post problem programming progressbar prototype redirect runtime safari scale scriptlets scroll search security shopping size software toggle unicode w3c web wysiwyg \n






