blackessej
blackessej

Reputation: 706

Form action problem

I have a form for people to share an email on a page. The forms pops up and users, in theory, can send an automated subject and message to a friend. When I hit submit, however, the brower displays a 404, and I'm not sure why...

<div id="tellfriend" class="contact_form">
  <form id='tellafriend_form' method="post" action="#"  >

    <label for="name">Your Name: </label>
    <input class="std_input" type="text" id="name" name="name" size="40" maxlength="35" value="" />

    <label for="to">Friend's email: </label>
    <input class="std_input" type="text" id="to" name="to" size="40" maxlength="35" />

    <label for="subject">Subject: </label>
    <input class="std_input" type="text" id="subject" name="subject" size="40" value="subject line" />

    <label for="message">Message: </label>
    <textarea id="message" name="message" readonly="readonly" rows="18" cols="40">message here</textarea>

    <input type="submit" name="submit" class="form_but" value="Submit"/>
  </form> 
</div><!-- #tellfriend -->

JS:

<script> 
$(function() {
    $('#tellfriend').hide();
    $('#sendMessage').click(function(e) {
        $("#tellfriend").fadeToggle('fast');
    });

});
</script>

site (bottom of the page): http://naturesfootprintinc.com/mjf

Upvotes: 1

Views: 323

Answers (2)

Adam
Adam

Reputation: 1694

Replace the action = "#" with the page where the data is processed or leave it blank so that the data is processed in the same page.

Upvotes: 1

Thomas Shields
Thomas Shields

Reputation: 8942

Your form action is set to "#". You need to change it to some actual CGI page the browser can post to, like your page's URL if you're just trying to post back to that.

Upvotes: 4

Related Questions