Thread: e-mailing a form
Results 1 to 10 of 10
Related
-
Mass Mailing script Forum: PHP Forum
Replies: 1 -
HTML Mailing Problem Forum: HTML Forum
Replies: 2 -
Mailing List CGI scripts Forum: Website Scripts Forum
Replies: 2
-
04-28-2009, 08:07 AM #1
e-mailing a form
Hello all. Well, I have created a site for my friends race track and one of the pages is a preregistration form. I have this form set up to create an e-mail when you hit the "Register" button and it works just fine from Firefox (the e-mail has all of the registration info), but when doing this from IE the e-mail is blank. I thought I had already tested this but I guess I had not.
The code is standard HTML, real simple and right from the book so I have no idea what I am looking for at the moment. Can someone else take a look and let me know if you see anything?
OCORR. This takes you right to the registration page.
Thanks so much
-
04-29-2009, 11:10 PM #2
Re: e-mailing a form
I guess I should have included the code I am using
HTML Code:<form method="post" action="mailto:my e-mail" enctype="text/plain">
-
04-30-2009, 09:36 AM #3
Re: e-mailing a form
I can't tell EXACTLY what is causing the issue, but my guess is that if you actually close all your tags, that would help. All <option> tags and <p> tags need to have an associated end tag (</option> and </p> respetively) at the end of them. IE8 is REALLY picky about that. Fix those issues, and we can go from there.
-
05-01-2009, 02:03 PM #4
Re: e-mailing a form
Hi jthayne. Thanks for getting back to me. I have looked it over pretty closely several times and I think I got all the tags closed (<option>, <p>, <input>) etc... and I even went back through and added the semi-colon to all the non-breaking space tags and still no joy. I have only tested this locally so I am going to upload all the changes now and see if that makes any difference.
Thanks again and if you see anything else that looks screwy, I will gladly check it out. I hate IE
-
05-01-2009, 03:26 PM #5
Re: e-mailing a form
Two things.
First, you did a good job closing the tags, but the <input> tags to not have closing tags. So you need to remove all the </input> tags.
Second, remove the spaces from the names (i.e. change name="car number" to name="car_number"). Then try again.
-
05-01-2009, 08:22 PM #6
Re: e-mailing a form
ARRGG!!!
OK, I have removed all of the closing input tags, placed underscores in place of spaces, and removed the dashes in e-mail and # at phone numbers, still no joy. I think I really need to be spending this time learning how to do this with javascript instead
Thanks for your time jthayne, I really do appreciate itIf nothing else really sticks out at you, I guess I will move on to another language and see if I can make it fly.
Thanks again.
-
05-04-2009, 09:42 AM #7
Re: e-mailing a form
Try removing the following from your code.
enctype="text/plain"
That fixed one issue on mine, but my IE has been buggy lately as well.
-
05-04-2009, 09:53 AM #8
Re: e-mailing a form
I had to put that in because the other parties reading the mails could not have possibly deciphered them. I think that was when I lost this in IE. I know dang well I tested everything there at least once, except for after I put enctype in.
Anyway, I just received a bit of javascript on another forum and it appears to work wonderfully, I just need to finish up. If you are interested, I could post a link here to that forum, or just the code used, in case anyone else is having a similar problem.
Thanks again for your help. Your time is truly appreciated.
-
05-04-2009, 10:01 AM #9
Re: e-mailing a form
No problem. The code would be appreciated in order to benefit anyone else with a similar problem. I understand the reason for the enctype, but for some reason, IE doesn't like it there. Having it there broke more than just the mailto on that.
Javascript is better since it will allow you to do some validation as well.
Glad to hear it is now working. Let us know if there is anything else we can do to help you out.
-
05-04-2009, 10:34 AM #10
Re: e-mailing a form
Here you go. I have edited it to be generic rather then show my info. Hope this can help someone else too
Code:<HTML> <HEAD> <TITLE>Your site title</TITLE> <SCRIPT LANGUAGE="JavaScript"> function SendMail (form) { var maildom = "something.net"; var mail1 = "person1@"; var mail2 = "person2@"; var subject = "Web Form Submission."; var race = "race="+form.race.value; var driver_name = "driver_name="+form.driver_name.value; var driver_phone = form.driver_phone.value; var driver_email = form.driver_email.value; var nick_name = form.nick_name.value; var co_driver = form.co_driver.value; var co_driver_phone = form.co_driver_phone.value; var co_driver_email = form.co_driver_email.value; var body_message = race+"%0D"+driver_name+"%0D"+driver_phone+"%0D"+driver_email+"%0D"+nick_name+"%0D"+co_driver+"%0D"+co_driver_phone+"%0D"+co_driver_email; var mailto_link = 'mailto:'+mail1+maildom+","+mail2+maildom+"?subject="+subject+"&body="+body_message; win = window.open(mailto_link,'emailWindow'); if (win && win.open &&!win.closed) win.close(); } </SCRIPT> </HEAD> <BODY> <FORM NAME="myform" ACTION="" METHOD="GET"> <H1>ENTER DETAILS FOR EMAIL:</H1> <p> Race date and Classes:<select name="race" size="1"> <option>May 16. RWB, Stock bug, UTV stock, UTV open, 8, 7, 7s, Trophy cart</option> <option>May 23. UTV National Championship $10,000.00 TO WIN!</option></select> </p> <p> Driver Name:<input type="text" name="driver_name"> Phone #:<input type="text" name="driver_phone"> E-mail:<input type="text" name="driver_email"> </p> <p> Nick Name:<input type="text" name="nick_name"> </p> <p> Co-Driver Name:<input type="text" name="co_driver"> Phone #:<input type="text" name="co_driver_phone"> E-mail:<input type="text" name="co_driver_email"> </p> <P><INPUT TYPE="button" NAME="button" Value="Prepare Default EMail" onClick="SendMail(this.form)"> <input type="reset" Value="Reset Values"></P> </FORM> </BODY> </HTML>