Click to See Complete Forum and Search --> : MailTo: HELP!
ccrazymike
07-04-2006, 10:19 AM
Happy 4th Everyone:
I am in the middle of creating a CONTACT US page. I am using FrontPage 2003 to do all my HTML, and layouts. On my CONTACT US page I have some text fields, drop down menus, and a text box. At the bottom is a SUBMIT button and a RESET button.
What I am trying to do is:
1) Make all the filled out form fields to be e-mailed to me. Fix?
2) Make the RESET button acctually for. (when I click RESET it does nothing) Fix?
3) The SUBMIT button when you click on it, changes from a nice looking rounded edge button, to a square edge button. Fix?
This is the code I have in there now:
<p><button onclick="window.location.href='mailto:djmyk022383@yahoo.com?Subject=ContactUs' ;this.style.backgroundColor='#ECE9D8'">Submit</button> </a><input type="reset" value="Reset" name="B2"></p>
Please Help!
humbug
07-04-2006, 10:35 AM
Without answering your question, I'd have to caution you that mailto: in a web page is a cast iron guarantee of wall-to-wall spam arriving at that mail address in due course. Believe me, I HAD a mailto: address like that, and had to abandon it!
the tree
07-04-2006, 11:15 AM
meh, spam, I have a filter. Anyways the "mailto" action is still pretty lousy as it relies on your visitors mail client wich is a pretty impractical approach. You would be better off using a process that runs on your server (Server Side Scripting). Which one you use (PHP, ASP, ASP.net, CGI-Perl, JSP, ColdFusion) depends on what your host supports.
I really wouldn't be using FrontPage for anything apart from creating sites for yourself, the code it produces is horrific, often buggers up in various browsers and causes all types of unneeded accessability issues. This is common to all WYSIWYGs but FrontPage does it particularly badly.
Although like I said, the "mailto" action is pretty lousy, take this as a very temporary sollution.<form action="mailto:email@domain.com" method="post">
<p><label for="name">Your Name:</label><input type="text" id="name"></p>
<p><label for="email">Your E-mail:</label><input type="text" id="email"></p>
<p><label for="comments">Your comments:</label><textarea id="comments">Tell me what you think...</textarea></p>
<p><input type="submit" value="Send!"><input type="reset" value="Reset form"></p>
</form>
ccrazymike
07-04-2006, 11:35 AM
SUBMIT button still doesnt do anything, and the RESET button still does nothing.
What I am trying to do now is get the Form sent to my yahoo email account. Help???
This is a link to my temporary site:
www.geocities.com/mykwebdesigns/contact.html
This is the code now that I have in there:
<form action="mailto:djmyk022383@yahoo.com" method="post">
<p><font color="#008000" face="Arial" size="2"><label for="name">Your Name:</label></font><input type="name" id="name" name="T1" size="20"><font color="#FF0000">*</font></p>
<p><label for="email"><font size="2" face="Arial" color="#008000">Your E-Mail:</font></label><input type="email" id="email" name="T2" size="20"><font color="#FF0000">*</font></p>
<p><font color="#008000"><font size="2" face="Arial">Topic: </font>
<select <select name="D1">
<option>< select a topic ></option>
<option value="1">General</option>
<option value="2">Web Design</option>
<option value="3">Assistance</option>
<option value="4">Sign-Up</option> size="1" name="D1"></select></font><font color="#FF0000">*</font></p>
<p><font color="#008000" face="Arial" size="2"><label for="comments">Your Comments:</label></font><textarea id="comments" name="S1" rows="4" cols="20"></textarea><font color="#FF0000">*</font></p>
</form>
<form method="POST" action="--WEBBOT-SELF--">
<!--webbot bot="SaveResults" U-File="fpweb:///_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" -->
<p><font color="#FF0000" face="Times New Roman">* </font>
<font size="2" color="#008000" face="Arial">all fields are
required.</font></p>
</form>
</a><input type="submit" value="Send!"><input type="reset" value="Reset form"></p>
</form>
felgall
07-04-2006, 03:35 PM
mailto: can only be used in links. Most browsers don't syupport its use with forms since it is the HTML command for "open the email program".
The best solution is to get a form2mail script that you can call that will convert the form content into an email. If you don't have the ability to put server side scripts on your own hosting then you can always use a third party one such as the one offered by Bravenet.
the tree
07-04-2006, 05:10 PM
Is it really surprising you that filling code with such horrific rubbish is causing the code to break?
Get rid of all font tags, close tags that need to be opened, don't try to nest forms, work in something like HTML-Kit (http://www.chami.com/html-kit/) that'll help you find even more of your errors.
Used correctly, what the example I gave works fine in IE and FF, it's obviously not an ideal sollution, and I wouldn't advice using it long term, but it works.