Click to See Complete Forum and Search --> : Javascript Needed
Baby Jai
06-28-2003, 11:54 PM
What would be the script to have a text field on my site, where someone puts in there email address, for subscription purposes and it gets sent to me? Whether it goes through a email client or not. I just need help writing this script
brendandonhue
06-28-2003, 11:56 PM
JavaScript can not process forms.
Baby Jai
06-29-2003, 12:00 AM
well then how come there is javascripts for Mail Forms? or at least html? maybe im a bit scratchy on this, then how would i create one?
brendandonhue
06-29-2003, 12:03 AM
There isn't. There is a mailto: link and that is neither a proper or reliable method. You need a serverside language.
Baby Jai
06-29-2003, 12:06 AM
http://javascript.internet.com/forms/mail-pick-subject.html, check that out an tell me diffrent. Thats exactly what I want but the only thing that i need from that is the first text area, and a submit button.
SlankenOgen
06-29-2003, 05:34 AM
<script type = "text/javascript">
function A()
{
var emailAddress = "mailto:"+document.F.Email.value+"?subject=SiteMail";
alert(emailAddress);
location.href = emailAddress;
}
</script>
</head>
<body onLoad = "A();" bgcolor="#ffffff">
<form action="(EmptyReference!)" method="get" name="F">
<p><input type="text" name="Email" value="jim@someplace.com" size="24" border="0"></p>
</form>
jeffmott
06-29-2003, 06:22 AM
Baby Jai, your JavaScript example also uses the mailto: scheme. Knowing that, you're better off just using a normal form. The methods for submission are the same, but the JS version will fail for approx. 1 in every 10 users.
brendandonhue
06-29-2003, 06:31 AM
Still, anything with mailto is not that great.
A LOT of people use hotmail, AOL, or Yahoo!. This will not work for them.
steelersfan88
06-30-2003, 01:52 PM
It is possible to send emails through html, but you do need a server to help. Signup at Bravenet.com and select Form Emailer. Copy the code aand change it to fit the form you need emailed. Thats it!