email form

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
aussie_clint
Forum Commoner
Posts: 41
Joined: Mon Jul 31, 2006 9:14 am
Location: Brisbane, Australia
Contact:

email form

Post by aussie_clint »

hi, im trying to do a email form, can someone please let me know where im going wrong

thanks

Code: Select all

 
 <table width="682" height="522" border="0">

        <tr> 

          <form action="mailto:image@ccis.com.au" method="post" enctype="text/plain" >

            <td width="7" height="32" valign="top"><p><font color="#000000" size="2">&nbsp;</font></p></td>

            <td width="127" valign="top"><strong><span class="style1"><font color="#000000" size="2">Name:</font></span></strong></td>

            <td width="534" align="left" valign="top"><input name="Name" type="text" class="style1" size="45"></td>
          </form>
        </tr>

        <tr> 

          <td valign="top" height="32"><font color="#000000" size="2">&nbsp;</font></td>

          <td valign="top"><strong><span class="style1"><font color="#000000" size="2">Contact 

            Email:</font></span></strong></td>

          <td valign="top"align="left"><input name="ContactEmail" type="text" class="style1" size="45"></td>
        </tr>

        <tr> 

          <td valign="top" height="32"><font color="#000000" size="2">&nbsp;</font></td>

          <td valign="top"><strong><span class="style1"><font color="#000000" size="2">Contact 

            Phone:</font></span></strong></td>

          <td valign="top" align="left"><input name="ContactPhone" type="text" class="style1" size="45"></td>
        </tr>

        <tr> 

          <td valign="top" height="170"><font color="#000000" size="2">&nbsp;</font></td>

          <td valign="top"><strong><span class="style1"><font color="#000000" size="2">Message/Enquiry:</font></span></strong></td>

          <td valign="top" align="left"><textarea name="Message" cols="42" rows="10" class="style1"></textarea></td>
        </tr>

        <tr> 

          <td valign="top" height="26">&nbsp;</td>

          <td valign="top"><span class="style1"><font color="#62af3d">&nbsp;</font></span></td>

          <td valign="bottom" height="26" align="left"><input name="Submit" type="submit" class="submitButton" value="Send" onClick="javascript: Validate()">
          &nbsp;
          <input name="clear" type="reset" class="submitButton" value="Clear"></td><tr>
          <td valign="top" height="216">&nbsp;</td>
          <td valign="top">&nbsp;</td>
          <td valign="bottom" height="216" align="left">&nbsp;</td>
      </table>
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

Your form tags are the problem. You're defining your form as only having the input "Name." You don't even have your submit button inside of it.

Code: Select all

<form action="mailto:image@ccis.com.au" method="post" enctype="text/plain" >

            <td width="7" height="32" valign="top"><p><font color="#000000" size="2">&nbsp;</font></p></td>

            <td width="127" valign="top"><strong><span class="style1"><font color="#000000" size="2">Name:</font></span></strong></td>

            <td width="534" align="left" valign="top"><input name="Name" type="text" class="style1" size="45"></td>
          </form> 
You want the form to include everything, right? Put your <form> tag around the entire table.
I've got a lot more than that to.. complain about. However, I won't criticize this code any further. :-p



Oh, and beware of spam. :lol:
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

Code: Select all

<form action="mailto:image@ccis.com.au"
I've never seen that before. I don't think you can do it like that.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

it can work, but it relies on the client's mail agent supporting it. It's extremely unreliable and should be avoided at all costs!
User avatar
superdezign
DevNet Master
Posts: 4135
Joined: Sat Jan 20, 2007 11:06 pm

Post by superdezign »

:-p

Didn't want to say anything. That's the way I was taught to first create forms. I believe I learned all of my beginner HTML at HTML Goodies a good ten years ago. They... simplified everything. A lot.
Post Reply