I need some help coding a Form

Ask a Question related to Macromedia Dynamic HTML, Design and Development.

  1. #1

    Default I need some help coding a Form

    I am new to writing HTML.

    I have read HTML tuts, looked at examples and tried different things, but I'm
    stuck on how to make my Form do what I need it to do.

    I have a simple Form that a user inputs information in and clicks a submit
    button.

    When the information is submitted, it must match a specific line of text
    (which is always the same and is specified somewhere within the code of that
    same page).

    If the submitted information does not match the specified line of text, then I
    need to present a message to the user to enter the correct information.

    If the submitted information does match the specified line of text, then I
    want to send the user to another (specified) page within the site.

    This is what I have so far;

    <html>
    <body>
    <form name="input" action="html_form_action.asp"
    method="get">

    <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
    Enter your answer and click Go
    </p>
    <form>
    Answer:
    <input type="text" name="answer">
    <input type="submit" value="Go">
    </form>

    Question>>>If the answer is not correct, what code do I need to put in here
    (???) to return a message like, "Please enter the correct answer"

    Question>>>If the answer is correct, what code do I need to put in here (???)
    to send the user to a specified page within the site?

    </font>
    </body>
    </html>

    Also, is this the correct type of form for what I am trying to do? <form
    name="input" action="html_form_action.asp"
    method="get">

    Can anyone help by providing me with the code that I need to make this Form do
    what I need it to do?

    Thank you,
    Charles


    CSUjr Guest

  2. Similar Questions and Discussions

    1. help in coding
      Hi, I want to build up interactive tutorials that has videos and audios, I want to show some images with voice comments on them, pleeeeeeeease...
    2. ASP Coding
      Is it tough to code ASP for a simple database results page? I've only ever used FrontPage wizards to create my database results ASP pages before,...
    3. c# coding
      (Type your message here) -------------------------------- From: lovey dovey I need help in writing a program that takes any integer and...
    4. coding
      Hi Gang, I am a Director programmer and do a little Flash. I've noticed some pretty complex coding in Flash and have searched diligently for...
    5. Lil fun be4 coding
      http://www.stud.ntnu.no/~shane/stasj/div_bilder/107.html Have a nice day ! -- Julien CROUZET
  3. #2

    Default Re: I need some help coding a Form

    You want *simple* (but unfortunately not so reliable)? Apply the DW
    Validate Form Behavior to the <form> tag (or for more customized error
    messages, use the Check Form Extension from Jaro - [url]http://www.yaromat.com[/url]).

    Both of these solutions rely on client-side javascript, and are therefore
    not completely reliable.

    For server-side validation, you're pretty much on your own. Assuming you
    are using ASP, you could have something like this in the body of the
    html_form_action.asp page:

    <% if request.form('answer')="correct answer" then response.write("Bravo!")
    %>
    <p><a href="success.html">Click here to continue</a></p>
    <% else %>
    <p>Bad guess, dude - try again</p>
    <p><a href="formpage.html">Click here to return to form</a></p>
    <% end if %>

    --
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    [url]http://www.dreamweavermx-templates.com[/url] - Template Triage!
    [url]http://www.projectseven.com/go[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.dwfaq.com[/url] - DW FAQs, Tutorials & Resources
    [url]http://www.macromedia.com/support/search/[/url] - Macromedia (MM) Technotes
    ==================


    "CSUjr" <webforumsuser@macromedia.com> wrote in message
    news:e58es9$c2b$1@forums.macromedia.com...
    >I am new to writing HTML.
    >
    > I have read HTML tuts, looked at examples and tried different things, but
    > I'm
    > stuck on how to make my Form do what I need it to do.
    >
    > I have a simple Form that a user inputs information in and clicks a submit
    > button.
    >
    > When the information is submitted, it must match a specific line of text
    > (which is always the same and is specified somewhere within the code of
    > that
    > same page).
    >
    > If the submitted information does not match the specified line of text,
    > then I
    > need to present a message to the user to enter the correct information.
    >
    > If the submitted information does match the specified line of text, then I
    > want to send the user to another (specified) page within the site.
    >
    > This is what I have so far;
    >
    > <html>
    > <body>
    > <form name="input" action="html_form_action.asp"
    > method="get">
    >
    > <p><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
    > Enter your answer and click Go
    > </p>
    > <form>
    > Answer:
    > <input type="text" name="answer">
    > <input type="submit" value="Go">
    > </form>
    >
    > Question>>>If the answer is not correct, what code do I need to put in
    > here
    > (???) to return a message like, "Please enter the correct answer"
    >
    > Question>>>If the answer is correct, what code do I need to put in here
    > (???)
    > to send the user to a specified page within the site?
    >
    > </font>
    > </body>
    > </html>
    >
    > Also, is this the correct type of form for what I am trying to do? <form
    > name="input" action="html_form_action.asp"
    > method="get">
    >
    > Can anyone help by providing me with the code that I need to make this
    > Form do
    > what I need it to do?
    >
    > Thank you,
    > Charles
    >
    >

    Murray *ACE* Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139