Ask a Question related to Macromedia Dynamic HTML, Design and Development.
-
CSUjr #1
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
-
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... -
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,... -
c# coding
(Type your message here) -------------------------------- From: lovey dovey I need help in writing a program that takes any integer and... -
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... -
Lil fun be4 coding
http://www.stud.ntnu.no/~shane/stasj/div_bilder/107.html Have a nice day ! -- Julien CROUZET -
Murray *ACE* #2
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



Reply With Quote

