Need help with design of email section of my website!

Discussion in 'HTML & Website Design' started by nicole.mortenson, Aug 22, 2012.

  1. #1
    I am designing a website and I am at the contact section. I am creating a form where the person can put their name, number, message, etc. I want to design it so that when they push send, it will send to my email but I am unsure on how to do this. Here is what my send button code is now:

    <a class="button" href="#" onClick="document.getElementById('contact-form').submit()">Send </a>

    I believe that after the onClick= is the location where i should be inserting my email but i tried and it isnt working. it just refreshes the page and I receive no email. Please let me know what I should try! THank you!:cool:
     
    nicole.mortenson, Aug 22, 2012 IP
  2. ashishkg

    ashishkg Active Member

    Messages:
    233
    Likes Received:
    8
    Best Answers:
    3
    Trophy Points:
    68
    #2
    So you need to use php mail function and pass the values which was insert in text fields.
    If you want my help PM me..
     
    ashishkg, Aug 22, 2012 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    You should NOT be using an anchor or javascript for that!!! That's what an input[submit] inside your form is for... which will submit to whatever action you set in the form.

    Though without seeing your actual code so far, you've tread into "this is why we can't help you" territory. But really, that is the LAST way you should EVER even be considering submitting a form.

    Of course, as ashishkg suggested, a form is USELESS without server-side code to process it, like PHP or ASP... you can't submit an e-mail client-side using javascript OR a form. The form data has to be submitted to some form of code on the server which then sends the e-mail.
     
    deathshadow, Aug 22, 2012 IP
  4. Rankx

    Rankx Active Member

    Messages:
    119
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    50
    #4
    I can do this for you if you would like me to.
     
    Rankx, Aug 23, 2012 IP
  5. cjarrodsnow

    cjarrodsnow Peon

    Messages:
    10
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    PM me and I'll send you the script with explanation... I tried to post the script for you, but my HTML is "off" and it wouldn't show up.
     
    cjarrodsnow, Aug 25, 2012 IP