Question

I am making a help file (.chm) for a project I am working on, but am having trouble with an HTML form element. What I want the form to be able to do is send an email so users can contact me about bugs, quetions, etc, but when I try the 'Submit' button, it notifies me that I am about to send the email, then crashes the Microsoft HTML Help Executable.

Here is my code:

<!DOCTYPE html>
<HTML>
<TITLE> Contact me </TITLE>

<BODY>
<IMG SRC="banner.png" WIDTH="800" HEIGHT="160" ALIGN="RIGHT" ALT="Banner">

<HR WIDTH="600" HEIGHT="5" ALIGN="RIGHT">
<P>

<H2 ALIGN="CENTER"><FONT FACE="Trebuchet MS">Contact me</FONT></H2>
</P>

<P><H4><FONT FACE="Trebuchet MS">Please enter the following details</FONT></H4>
<FONT FACE="Trebuchet MS">
    <FORM ENCTYPE="text/plain" METHOD="POST" ACTION="mailto:someone@example.com">
        Your name: <INPUT TYPE="TEXT" NAME="Name">

        <P>Details:
            <TEXTAREA ROWS="10" COLS="50" NAME="Details"></TEXTAREA>
        </P>

        <INPUT TYPE="SUBMIT" VALUE="Submit">
    </FORM>
</FONT>
</BODY>
</HTML>

Sorry about my terrible formatting, but hopefully you get the idea.

I have found that when I launch this in Google Chrome as a regular HTML document, it works fine and sends the email perfectly, but when I try it in Internet Explorer as an HTML, it crashes (typical). What am I doing wrong?

Thanks in advance

Was it helpful?

Solution

I don't think it's actually 100% possible, nor would I recommend it if it were.

I think a much better way would be to provide a link to a Contact Me page on your site, or simply provide your email in the body of the CHM.

General Points

  • UPPERCASING HTML tag names, while valid, is really annoying (subjective). A proper naming convention is where all HTML tags, attributes and keywords are lowercased.
  • Use <label> elements when referring to form labels, example:

    <label>Your Name: <input type="text" name="Name"></label>
    

    This adds the nice bonus of making the "Your Name:" text clickable as well!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top