tags:

views:

177

answers:

1

I can not get the form to submit with the button. The best luck I have had is to send a generic email with no data attached.

This is the code:

                  <input name="mailto: [email protected]" type="submit" onClick=mailto: [email protected]  value="Submit Form" id="mailto: [email protected]" >

the value is: /frms/contact.con

Can anyone help????

+1  A: 

Submit buttons generally aren't used for storing information -- as a rule, they just submit the page, and any other information (such as the email recipient's address) will be put in other inputs in the form. For example:

<form action="/frms/contact.con" method="post">

 <label>Subject: <input type="text" name="subject" value="" /></label>

 <label for="message-editor">Message</label>
 <textarea name="message" rows="6" cols="60" id="message-editor"></textarea>

 <input type="submit" value="Submit" />

 <input type="hidden" name="recipient" value="[email protected]" />
</form>

In this example, the "action" attribute of the FORM element specifies the script on the server which will process the information once someone clicks Submit. The hidden input which I have named "recipient" specifies the email address, and the value of that will be sent in along with the rest of the form when it's submitted. All the submit button itself does is cause the browser to send the finished form off to the server for processing.

Note that the example I've given here probably won't work with your particular script, because the names I've selected for the example inputs ("subject", "message", and "recipient") probably don't match the ones your script expects.

Do you have documentation on how the /frms/contact.con script works? If so, check it -- it should tell you what to name your form elements. Failing that, and assuming that you know whatever programming language it was written in, you could read the code in contact.con to see what names it's expecting.

If all else fails, try a different server-side script, there are about eight zillion available.

Will