12-20-2005, 12:47 AM
Sorry if it's a complicated question. I need help with this so I turned here; I'm sorry if I'm doing something wrong.
What I'm trying to say is that, is there a script that makes a form box on a webpage with default words inside of it, and once the user types the things out, a link is pressed and what was in the form is sent as an email?
It's sort of like an application kind of thing, where the default words are questions in my case.
I've tried googling but no success.
Thanks in advance,
12-20-2005, 05:44 AM
12-20-2005, 11:24 AM
If you are unable or unwilling to use server side language, the following will work in IE only.
isBody = "";
recipient = "me@someDomain.com";
isSubject = "Form Data";
isBody = "Name: " + isForm.personal.value +"%0D%0A";
isBody += "Address: " + isForm.address.value +"%0D%0A";
isBody += "City: " + isForm.city.value +"%0D%0A";
isBody += "State: " + isForm.state.value +"%0D%0A";
isBody += "Zip: " + isForm.zip.value;
document.forms.Send.action = "mailto:"+recipient+"?subject="+isSubject+"&body="+isBody+" ";
Name <input type='text' name='personal' value="John Doe" size=25><br>
Address <input type='text' name='address' value="123 Main Street" size=30><br>
City <input type='text' name='city' value="Springfield" size=15> State <input type='text' name='state' value="OH" size=2><br>
Zip Code <input type='text' name='zip' value="12345" size=4><br>
<form name='Send' action=''>
<input type="submit" value="Send by Email" onclick="sendMail(document.Form1)">
12-23-2005, 11:17 PM
Thank you very much ^_^ That's just what I needed.
Happy holidays :)
12-25-2005, 09:27 PM
That code will only work if there is a separate email program available on the computer (which rules out internet cafes and may other users). Also it doesn't work on modern browsers. Also it gives your email address to the spammers. 99% of the emails resulting from the code will be spam.
Use a server side solution. If you don't have access to put a script on your own site then use a third party one from somewhwere like Bravenet.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.