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.

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

Hey

<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.

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.

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.