Forms
Why do forms set with "ACTION=mailto:[email protected]" don't function when I use compuserve or an aol account as my default?
All it does on clicking the submit button is pop up the create mail window.
whereas when I use other services or have hotmail account set as default email I don't face this problem. the form data is already in the email when I click the submit button and all I have to do 'send'.
I hope I am clear on this mysterious problem. If not, ask questions, but please HELP!!!
Jack Michaelson posted this at 20:53 — 22nd January 2001.
He has: 1,733 posts
Joined: Dec 1999
Yeah, I've had the same problem and this is how I solved it:
1. I went to Matt's Script Archive and downloaded formscript.pl
2. I altered the file to my needs
3. Loaded the formscript.pl up to my cgi-bin dir.
4. changed the action into action=../cgi-bin/formscript.pl
5. tested it
6. noticed that the problem was solved
7. shouted out all kind of nice words!
Shakespeare: onclick || !(onclick)
webstar posted this at 21:57 — 22nd January 2001.
They have: 5 posts
Joined: Jan 2001
Jack
So theres no way to solve this problem without having a ..cgi/bin dir ? I wanted something simpler.
Thanks anyway.
Jack Michaelson posted this at 08:27 — 23rd January 2001.
He has: 1,733 posts
Joined: Dec 1999
webstar,
not that I know of.
It is Netscape that comes up with the default mail-program, right?
webstar posted this at 14:46 — 23rd January 2001.
They have: 5 posts
Joined: Jan 2001
Jack
You can set up the default email whatever you want by changing the 'programs' menu in internet options of IE.
I found this one site http://www.response-o-matic.com
they'll process you forms for free and the form data is emailed to you. I tried it but it is VERY slow. so for now, i just have my email address on the site, no forms.
Thanks
jonsteele posted this at 20:44 — 26th January 2001.
They have: 21 posts
Joined: Nov 2000
couldn't you add the fields to the mailto manually? using BODY?
<script>
function sendmail(){
location.href = "mailto:[email protected]?BODY="+document.forms(0).mytext.value;
}
</script>
<form>
<textarea cols="40" rows="20" name="mytext"></textarea>
<input type="button" onclick="sendmail()">
</form>
This might bring up other problems (like carriage returns for long text) but those can be fixed using othermethods. If you have one line fields, then its ok.
Jon.
Jon Steele -
EverySolution.com
webstar posted this at 15:38 — 28th January 2001.
They have: 5 posts
Joined: Jan 2001
jonsteele
Yes, that can be done. then if i understand right would i have to write functions for all the fields?
Another thing is.....the user must have all the email options set up right for the mailto: to work. so i guess i'll wait till learn cold fusion or cgi.
thanks for the tip
jonsteele posted this at 19:56 — 28th January 2001.
They have: 21 posts
Joined: Nov 2000
That would work if you don't have any textarea fields. For multiple one-line values, you can use something like this:
location.href = "mailto:[email protected]?BODY=Value1="+document.forms(0).mytext1.value+"\nValue2="+document.forms(0).mytext2.value+"\nValue3="+document.forms(0).mytext3.value+"\nValue4="+document.forms(0).mytext4.value+"\nValue5="+document.forms(0).mytext5.value
You mail'll look something like:
Value1=blahblah
Value2=blahblah
Value3=blahblah
Value4=blahblah
Value5=blahblah
For sending mail in general, I strongly recommend PHP (if you have it on your server). Look here for a good tutorial:http://www.thickbook.com/extra/php_email.phtml
Jon.
Jon Steele -
EverySolution.com
webstar posted this at 21:04 — 28th January 2001.
They have: 5 posts
Joined: Jan 2001
thanks very much.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.