SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Thread: Submit Help!

  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy Submit Help!

    This form wont go anywhere, so can someone tell me how to get this form to submit to a certain place like an email?
    <code>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta name=
    "GENERATOR" content="Microsoft FrontPage 4.0">
    <meta name=
    "ProgId" content="FrontPage.Editor.Document">
    <title>
    New Page 2</title>
    </HEAD>
    <BODY>
    <p align="center"><img border="1" src="""header1.jpg" width="500" height="71">
    <!-- TWO STEPS TO INSTALL VALIDATION:
    1. Copy the coding into the HEAD of your HTML document
    2. Add the last code into the BODY of your HTML document -->
    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->
    <SCRIPT LANGUAGE="JavaScript">
    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->
    <!-- Begin
    function checkFields() {
    missinginfo = "";
    if (document.form.name.value == "") {
    missinginfo += "\n - Name";
    }
    if ((document.form.from.value == "") ||
    (document.form.from.value.indexOf('@') == -1) ||
    (document.form.from.value.indexOf('.') == -1)) {
    missinginfo += "\n - Email address";
    }
    if (document.form.name.value == "") {
    missinginfo += "\n - Name";
    }
    if (document.form.age.value == "") {
    missinginfo += "\n - Age";
    }
    if (document.form.gender.value == "") {
    missinginfo += "\n - Gender";
    }
    if (document.form.species.value == "") {
    missinginfo += "\n - Species";
    }
    if (document.form.color.value == "") {
    missinginfo += "\n - Color";
    }
    if (document.form.universe.value == "") {
    missinginfo += "\n - Universe";
    }
    if (document.form.alignment.value == "") {
    missinginfo += "\n - Alignment";
    }
    if (document.form.transformations.value == "") {
    missinginfo += "\n - Transformations";
    }
    if (document.form.likes.value == "") {
    missinginfo += "\n - Likes";
    }
    if (document.form.dislikes.value == "") {
    missinginfo += "\n - Dislikes";
    }
    if (document.form.goal.value == "") {
    missinginfo += "\n - Goal";
    }
    if(document.form.bio.value == "") {
    missinginfo += "\n - Bio";
    }
    if (missinginfo != "") {
    missinginfo ="_____________________________\n" +
    "You failed to correctly fill in your:\n" +
    missinginfo + "\n_____________________________" +
    "\nPlease re-enter and submit again!";
    alert(missinginfo);
    return false;
    }
    else return true;
    }
    // End -->
    </script>
    <!-- STEP TWO: Copy this code into the BODY of your HTML document -->
    <form name=form onSubmit="return checkFields();">
    <input type=hidden name=to value='sonicfighters@sonicfighters.com'>
    <input type=
    hidden name=subject value="Freedback">
    <div align="left">
    <pre>
    MemberName: <input type=text name="name" size=30>
    Password: <input type=text name="pass" size=30>
    E-mail: <input type=text name="from" size=30>
    <b><u>Character Bio</b></u>
    Name: <input type=text name="website" size=30>
    Age: <input type=text name="age" size=30>
    Gender: <input type=text name="gender" size=30>
    Species: <input type=text name="species" size=30>
    Color: <input type=text name="color" size=30>
    Universe: <input type=text name="universe" size=30>
    Alignment: <input type=text name="alignment" size=30>
    Transformations: <input type=text name="transformations" size=30>
    Likes: <input type=text name="likes" size=30>
    Dislikes: <input type=text name="dislikes" size=30>
    Goal: <input type=text name="goal" size=30>
    Bio:
    <textarea rows=3 cols=40 name="comments"></textarea>
    <input type=submit name="submit" value="Submit Form!">
    </pre>
    </div>
    </form>
    <p><center>
    <font face=
    "arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="""http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>
    <!-- Script Size: 1.94 KB -->
    </body>
    </html>
    </code>

  2. #2
    SitePoint Addict
    Join Date
    Aug 2001
    Location
    Los Angeles, CA
    Posts
    346
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    just put:

    action="mailto:email@address.com"

    in your <form> tag...

  3. #3
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It says document.form.bio.value is null or not an object...what does that mean?

  4. #4
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    NVM i figured it out...thanks for your help.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •