Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SUBMITTING A FORM

Status
Not open for further replies.

rry2k

Programmer
Jun 28, 2001
678
US
Hi,

I'm trying to create a submittion form and after pressing submit I get a new message dialog box from Outlook and the info entered into the form isn't included. I need this to auto send when the button is pressed.
Thanks alot for the help..Russ

<html>
<head>
<title>Form Example</title>
</head>
<body>
<h1>Form Example</h1>
Enter the following information. When you press the display button, The data you send will be sent via email.
<FORM NAME=&quot;form1&quot; action=&quot;mailto:info@kodycomputertraining.com&quot; enctype=&quot;text/plain&quot;>
<b>Address:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;address&quot;>
<p>
<b>Phone:</b> <input type=&quot;text&quot; length=&quot;15&quot; name=&quot;phone&quot;>
<p>
<input type=&quot;submit&quot; value=&quot;submit&quot;
</form>
<body>
<html>
 
Maybe this example will help?

<html>
<head>
<title>Form Example</title>
<script language=&quot;javascript&quot;>
function sendmail(url)
{
var doc = &quot;mailto:&quot;

doc = doc + url;

doc = doc + &quot;?subject=MySubjectText&quot;;
doc = doc + &quot;&body=Address: &quot; + form1.address.value;
doc = doc + &quot;%0d&quot;;
doc = doc + &quot;Phone: &quot; + form1.phone.value;
window.location.href = doc;
}
</script>

</head>
<body>
<h1>Form Example</h1>
Enter the following information. When you press the display button, The data you send will be sent via email.
<FORM NAME=&quot;form1&quot;>
<b>Address:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;address&quot;>
<p>
<b>Phone:</b> <input type=&quot;text&quot; length=&quot;15&quot; name=&quot;phone&quot;>
<p>
<input type=&quot;submit&quot; value=&quot;submit&quot; onclick=&quot;sendmail('info@kodycomputertraining.com')&quot;>
</form>
<body>
<html>

Erik

<-- My sport: Boomerang throwing !!
!! Many Happy Returns !! -->
 
Back at ya Boomerang.
What you gave me worked fine until I added a few lines then it fried.

Heeeelllpppp. I also need the email that I get back to be formatted into seperate lines so I'm not sure if I need a <p> or <br> somewhere.

Thanks..Russ

<html>
<head>
<title>Form Example</title>
<script language=&quot;javascript&quot;>
function sendmail(url)
{
var doc = &quot;mailto:&quot;

doc = doc + url;

doc = doc + &quot;?subject=Collections&quot;;
doc = doc + &quot;&body=Name1: &quot; + form1.Name1.value;
doc = doc + &quot;&body=Address: &quot; + form1.address1.value;
doc = doc + &quot;&body=City: &quot; + form1.City.value;
doc = doc + &quot;&body=State: &quot; + form1.State.value;
doc = doc + &quot;&body=Zip: &quot; + form1.Zip.value;
doc = doc + &quot;%0d&quot;;
doc = doc + &quot;Phone: &quot; + form1.phone.value;
window.location.href = doc;
}
</script>

</head>
<body>
<h1>Form Example</h1>
Enter the following information. When you press the submit button, The data you send will be sent via email.
<FORM NAME=&quot;form1&quot;>
<b>Name1:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;Name1&quot;>
<p>
<b>Address1:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;address&quot;>
<p>
<b>City:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;City&quot;>
<p>
<b>State:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;State&quot;>
<p>
<b>Zip:</b> <input type=&quot;text&quot; length=&quot;30&quot; name=&quot;Zip&quot;>
<p>
<b>Phone:</b> <input type=&quot;text&quot; length=&quot;15&quot; name=&quot;phone&quot;>
<p>
<input type=&quot;submit&quot; value=&quot;submit&quot; onclick=&quot;sendmail('info@kodycomputertraining.com')&quot;>
</form>
<body>
<html>
 
Thanks that worked but when I try to add a third field like name, it doesn't work. See code above.

Thanks..Russ
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top