Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Email notififcation

    I'm trying to make a email notification form. the following code is not sending an email to me. What do I have wrong? I hate forms.

    <form class="email" action="mailto:info@decodingdyslexiaok.org" method="post" enctype="text/plain">
    <input type="text" class="field" onfocus="if(this.value=='Get Notified (Email Address)') this.value='';" onblur="if(this.value=='' || this.value==' ') this.value='Get Notified (Email Address)';" value="Get Notified (Email Address)" />
    <input type="button" class="submit" />
    </form>

    thanks for your help

  • #2
    Senior Coder
    Join Date
    Aug 2006
    Posts
    1,142
    Thanks
    7
    Thanked 257 Times in 256 Posts
    The action of a form is supposed to be a server-side script to process the form. Your "mailto:info...." is not such a script. You can find generic mailer forms online if you don't want to write one yourself...

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,479
    Thanks
    0
    Thanked 635 Times in 625 Posts
    Most browsers will not accept action="mailto:

    You can either use a link for the mailto: so that people can click the link to open their desktop email program to send the email (assuming they have one) or use a form2mail server side script as the action for your form.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •