1

I have the following code for an email form from an HTML template. I'd like to make it send email, as the moment I think it doesn't and I need to add some javascript to process the form. Any tips on how to do that for this form?

Thank you!

<!-- Email -->
<article id="email" class="panel">
    <header>

<h2>Email Me</h2>

    </header>
    <form action="#" method="post">
        <div class="5grid">
            <div class="row">
                <div class="6u">
                    <input type="text" class="text" name="name" placeholder="Name" />
                </div>
                <div class="6u">
                    <input type="text" class="text" name="email" placeholder="Email" />
                </div>
            </div>
            <div class="row">
                <div class="12u">
                    <input type="text" class="text" name="subject" placeholder="Subject" />
                </div>
            </div>
            <div class="row">
                <div class="12u">
                    <textarea name="message" placeholder="Message"></textarea>
                </div>
            </div>
            <div class="row">
                <div class="12u">
                    <input type="submit" class="button" value="Send Message" />
                </div>
            </div>
        </div>
    </form>
</article>
1
  • JavaScript can't send emails directly, you'll need a Server-Side script Commented Mar 22, 2013 at 17:54

1 Answer 1

2

Javascript cannot send an email (unless it's calling a server-side method using AJAX). You need a server-side language (e.g. C#, php, ColdFusion, etc.).

Sign up to request clarification or add additional context in comments.

2 Comments

ah well clearly I didn't know that haha. someone had a javascript file sending an email form, but I guess it was calling PHP somewhere. In that case, any tips for sending this with PHP?
@Matthew, I'm not a PHP guy, I'm a C# guy. I suggest posting a new question...you'll get an much better (and faster) answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.