paulm
11-13-2008, 05:30 PM
I am trying to code a javascript contact form but am experiencing a problem with firefox 3. It seems that it automatically wants to open up the users default email site ( gmail, yahoo ). Instead of sending the email automatically. I know that I can do this with PHP, but I always thought it could be done just as easily with javascript. I have tested it in IE and I only get that message asking to confirm.
So my question is. Is how can I get it to send the email without opening up there default email provider, using javascript. Here is some of my code:
<form enctype="text/plain" name="addform" method='get'action='mailto:...?subject=Welcome Pages - Mailing Test' onSubmit="return submitForms()">
<input type="hidden" name="Form" value="Submit Sub">
<table border="0" style="margin-top:50px; " cellpadding="2" cellspacing="5">
<tr>
<td align="left" valign="bottom" width="50%">
<p>Full Name: <br />
<input type=text name="Full Name" size=30,1 maxlength=40></p>
</td>
<td align="left" valign="bottom">
<p>Email Address: <br />
<input type=text name="Email Address" size=30,1 maxlength=40></p>
</td>
</tr>
<tr>
<td align="left" valign="bottom">
<p>OREA Student ID: <br />
<input type=text name="Student ID" size=30,1 maxlength=8></p>
</td>
<td align="left" valign="bottom">
<p>Prefered Contact Number: <br />
<input type=text name="Phone Number" size=30,1 maxlength=20></p>
</td>
</tr>
<tr>
<td align="left" valign="bottom">
<p>Operating System: <br />
<input type=text name="Operating System" size=30,1 maxlength=40></p>
</td>
<td align="left" valign="bottom">
<p>Web Browser: <br />
<span style="font-size:10px;"> ( e.g. Firefox, Internet Explorer 6, Safari ) </span> <br />
<input type=text name="Broswer" size=30,1 maxlength=40></p>
</td>
</tr>
<tr>
<td align="center" colspan="2" valign="bottom">
<p>Session/Module where issue was encountered <br />
<input type=text name="Issue" size=50,1 maxlength=40></p>
</td>
</tr>
<tr>
<td align="center" colspan="2" valign="bottom">
<p>Briefly describe the problem you are having: <br />
<textarea name="Description" cols="50,2" rows="5" ></textarea></p>
</td>
</tr>
</table>
<p style="font-size:10px;">All personal information received is kept confidential.</p>
<input type="submit" value=" Submit ">
<input type="button" value=" Return " onclick="window.location='...'">
<input type="reset" value="Reset Form" onclick=resetform()>
</table>
</form>
So my question is. Is how can I get it to send the email without opening up there default email provider, using javascript. Here is some of my code:
<form enctype="text/plain" name="addform" method='get'action='mailto:...?subject=Welcome Pages - Mailing Test' onSubmit="return submitForms()">
<input type="hidden" name="Form" value="Submit Sub">
<table border="0" style="margin-top:50px; " cellpadding="2" cellspacing="5">
<tr>
<td align="left" valign="bottom" width="50%">
<p>Full Name: <br />
<input type=text name="Full Name" size=30,1 maxlength=40></p>
</td>
<td align="left" valign="bottom">
<p>Email Address: <br />
<input type=text name="Email Address" size=30,1 maxlength=40></p>
</td>
</tr>
<tr>
<td align="left" valign="bottom">
<p>OREA Student ID: <br />
<input type=text name="Student ID" size=30,1 maxlength=8></p>
</td>
<td align="left" valign="bottom">
<p>Prefered Contact Number: <br />
<input type=text name="Phone Number" size=30,1 maxlength=20></p>
</td>
</tr>
<tr>
<td align="left" valign="bottom">
<p>Operating System: <br />
<input type=text name="Operating System" size=30,1 maxlength=40></p>
</td>
<td align="left" valign="bottom">
<p>Web Browser: <br />
<span style="font-size:10px;"> ( e.g. Firefox, Internet Explorer 6, Safari ) </span> <br />
<input type=text name="Broswer" size=30,1 maxlength=40></p>
</td>
</tr>
<tr>
<td align="center" colspan="2" valign="bottom">
<p>Session/Module where issue was encountered <br />
<input type=text name="Issue" size=50,1 maxlength=40></p>
</td>
</tr>
<tr>
<td align="center" colspan="2" valign="bottom">
<p>Briefly describe the problem you are having: <br />
<textarea name="Description" cols="50,2" rows="5" ></textarea></p>
</td>
</tr>
</table>
<p style="font-size:10px;">All personal information received is kept confidential.</p>
<input type="submit" value=" Submit ">
<input type="button" value=" Return " onclick="window.location='...'">
<input type="reset" value="Reset Form" onclick=resetform()>
</table>
</form>