Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 7 of 7
  1. #1
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    I have a e-mail form on my contact page, and I was wondering now to get it to not come up with the "Page Not Found", after the e-mail is submitted. Any help would be appreciated.
    HTML Code:
    <form mailto: "me@domain" method="post">
    <p>Name:<br><input type="text" name="Name" size=40></p>
    <p>E-Mail Address:<br><input type="text" name="E-Mail Address" size=40></p>
    <p>Message Subject:<br><input type="text" name="Message Subject" size=40></p>
    <p>Message Body:<br><textarea cols=40 rows=10>Please
    type your message here.</textarea></p>
    <p><input type="submit" value="Submit E-Mail" name="submit">&nbsp;&nbsp;&nbsp;
    <input type="submit" value="Clear Form" name="clear"></p></form>
    There is my form. Is it done properly? Everything looks fine on the page,
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  2.  

  3. #2
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    Hey, a few things

    1: Your form needs an action attribute, you were nearly there, you just needed the mailto: part inside the methods value.

    2: I do not know what DOCTYPE you are coding for, but all attributes values should be in quotes (you have size=42 for instance, it should be size="42").

    3: Your clear button is of type submit, it should be type="reset".

    Try this code.
    HTML Code:
    <form action="mailto:me@domain.com" method="post">
    
    	<p>Name:<br><input type="text" name="Name" size="40" /></p>
    	<p>E-Mail Address:<br><input type="text" name="E-Mail Address" size="40" /></p>
    	<p>Message Subject:<br><input type="text" name="Message Subject" size="40" /></p>
    	<p>Message Body:<br><textarea cols="40" rows="10">Please type your message here.</textarea></p>
    	<p><input type="submit" value="Submit E-Mail" name="submit">&nbsp;&nbsp;&nbsp;
                  <input type="reset" value="Clear Form" name="clear"></p>
    
    </form>
    Good luck.

  4. #3
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    Thank you. That worked!
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  5. #4
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    My wife just tested the form out, and I got the e-mail, though the body is empty. Any suggestions for that?
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  6. #5
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    When you enter values into the form fields, and click "Submit E-mail", your default email client opens yes?

    Is there anything in the email fields, there should be text in the body, and an address in the to: field

  7. #6
    Senior Member -chris-'s Avatar
    Join Date
    Apr 2006
    Location
    SK
    Posts
    1,205
    Member #
    13102
    I fixed the problem, I changed the method="post" to method="get".

    Thank you for your help.
    Portfolio | Blog | Twitter

    Was my post, or someone elses, helpful? Click the thumbs up to let everyone know!

  8. #7
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Changing from POST to GET is not desirable in this situation. You should try to find the root of the problem instead. You should never use GET with requests that contain large amounts of request data...in this case, the message subject and body.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com