 |
|
|
| View previous topic :: View next topic |
| Author |
Message |
scottmajor1
Joined: 18 Oct 2004 Posts: 4 Location: Canada
|
Posted: Mon Oct 18, 2004 9:46 am Submit form How to? |
|
|
|
I'm tring to make a survey form on a site with a submit button:
Like this
name:
phone:
email:
submit button
I've been able to create the form itself with no problem, but now I need to find out what is the code for the submit button to work, what I mean is that the information that people have filled in be sent to a specific email address. It is of no importance that the email when received be "fancy" it simply needs to be a little like this
name=John Doe
phone=800-555-1234
email=jdoeatsomething.com
The code needs to be html and not asp.
Thanks
Scott |
|
nagasree
Joined: 21 Sep 2004 Posts: 82 Location: Hyderabad, India
|
Posted: Mon Oct 18, 2004 11:13 pm |
|
|
|
Try this out
| Code: |
<HTML>
<HEAD>
<TITLE>HTML Mail </TITLE>
</HEAD>
<script language="javascript">
function SendEmail(frm){
var emailAddress="xxxatyy.com"
var message = "Name:" + frm.txtName.value + "\n";
message = message +"Phone:" + frm.txtPhone.value;
message = message +"\nEmail:" + frm.txtEmail.value;
document.location.href = "mailto:"+emailAddress+"?subject=Test Mail&body="+escape(message);
}
</script>
<BODY>
<form name="frmSendEmail" >
<TABLE>
<TR>
<TD vAlign=center align=right width="35%">
Name:
</TD>
<TD width="65%"><input type=text name=txtName value=""></TD></TR>
<TR>
<TD vAlign=center align=right width="35%">
Phone:
</TD>
<TD width="65%"><input type=text name=txtPhone value=""></TD></TR>
<TR>
<TD vAlign=center align=right width="35%">
Email:
</TD>
<TD width="65%"><input type=text name=txtEmail value=""></TD></TR>
<TR><TD vAlign=center align=center width="100%" colspan=2>
<INPUT TYPE="button" name="sendEmail" Value="Send Email" onclick="SendEmail(this.form)">
</TD></TR>
</TABLE>
</form>
</BODY>
|
-Nagasree |
|
scottmajor1
Joined: 18 Oct 2004 Posts: 4 Location: Canada
|
Posted: Wed Oct 20, 2004 12:23 pm |
|
|
|
I tried this code, it perfect but I don't see where I can input an email address so that when the user types in his information that it is sent to my email.
Thanks
Scott
| nagasree wrote: |
Try this out
| Code: |
<HTML>
<HEAD>
<TITLE>HTML Mail </TITLE>
</HEAD>
<script language="javascript">
function SendEmail(frm){
var emailAddress="xxxatyy.com"
var message = "Name:" + frm.txtName.value + "\n";
message = message +"Phone:" + frm.txtPhone.value;
message = message +"\nEmail:" + frm.txtEmail.value;
document.location.href = "mailto:"+emailAddress+"?subject=Test Mail&body="+escape(message);
}
</script>
<BODY>
<form name="frmSendEmail" >
<TABLE>
<TR>
<TD vAlign=center align=right width="35%">
Name:
</TD>
<TD width="65%"><input type=text name=txtName value=""></TD></TR>
<TR>
<TD vAlign=center align=right width="35%">
Phone:
</TD>
<TD width="65%"><input type=text name=txtPhone value=""></TD></TR>
<TR>
<TD vAlign=center align=right width="35%">
Email:
</TD>
<TD width="65%"><input type=text name=txtEmail value=""></TD></TR>
<TR><TD vAlign=center align=center width="100%" colspan=2>
<INPUT TYPE="button" name="sendEmail" Value="Send Email" onclick="SendEmail(this.form)">
</TD></TR>
</TABLE>
</form>
</BODY>
|
-Nagasree |
|
|
orbital
Joined: 11 Oct 2004 Posts: 8
|
Posted: Wed Oct 20, 2004 10:28 pm |
|
|
|
wouldnt you replace your email instead of this one
|
|
Html [newb]
Joined: 17 Dec 2004 Posts: 3
|
Posted: Fri Dec 17, 2004 3:30 pm AWSOME |
|
|
|
soo, thanks man, it helped me too. But.....
What does that javascript jiberish mean...
where did u learn it..i would like to learn some java script |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|
|
 |
|
|
|
|
|
|
|