I just ran it again with a name entered for the email input and validate
still didn't run.  I then took the ajax forms script out to isolate to
validate.  It still didn't validate.  I must be doing something simple
wrong.  Thanks.

Here is my updated broken code/html:
--------------------
<html>
<head>
    <script type="text/javascript" src="jquery-1.2.6.min.js"></script>
    <script type="text/javascript" src="jquery.form.js"></script>
    <script type="text/javascript" src="jquery.validate.js"></script>
    <script type="text/javascript" src="jquery.metadata.js"></script>

    <script type="text/javascript">
        // wait for the DOM to be loaded
        $(document).ready(function() {
            // bind 'myForm' and provide a simple callback function
            //$('#myForm').ajaxForm(function() {
            //    alert("Thank you for your comment!");
            $("#myForm").validate();
            });
    </script>
</head>
<body>

<FORM id="myform" ACTION="
http://www.cs.tut.fi/cgi-bin/run/~jkorpela/echo.cgi";
METHOD="POST">

<P>
Type something:<BR>
<TEXTAREA ROWS=5 COLS=72 NAME=Comments>
This is
some text
in several lines.
</TEXTAREA>
<p>
<INPUT TYPE="checkbox" NAME="box" VALUE="yes">Check me!
<P>
email: <INPUT Type="text" name="myEmail" class="required email">
<INPUT TYPE="HIDDEN" NAME="hidden field" VALUE="something">
<INPUT name="mysubmit" TYPE="SUBMIT" VALUE="Send">
</FORM>
</body>
</html>

On Wed, Oct 22, 2008 at 9:11 AM, Jörn Zaefferer <
[EMAIL PROTECTED]> wrote:

> Your input elements must have a name, otherwise the validation doesn't
> work.
>
> Jörn
>
> On Wed, Oct 22, 2008 at 2:49 PM, whitewaterbug <[EMAIL PROTECTED]>
> wrote:
> >
> > I am trying to get the validate plugin and the form plugin to work
> > together.  I would like to use in HTML markup to describe the
> > validation, as it seems cleaner to read to me.  So, I downloaded
> > jquery, form, validate, and metadata...whipped up a quick form and
> > tried it out.
> >
> > From firebug, I can see that all scripts are being downloaded
> > successfully.  But no validations are happening on th email text
> > input.  The tag I thought would turn the validation on is:
> >
> > <INPUT Type="text" class="required email">
> >
> > Here is the actual form...what did I miss?
> >
> > thanks!!
> >
> > ---------------------------------------------------
> >
> > <html>
> > <head>
> >    <script type="text/javascript" src="jquery-1.2.6.min.js"></
> > script>
> >    <script type="text/javascript" src="jquery.form.js"></script>
> >    <script type="text/javascript" src="jquery.validate.js"></script>
> >        <script type="text/javascript" src="jquery.metadata.js"></script>
> >
> >    <script type="text/javascript">
> >        // wait for the DOM to be loaded
> >        $(document).ready(function() {
> >            // bind 'myForm' and provide a simple callback function
> >            $('#myForm').ajaxForm(function() {
> >                alert("Thank you for your comment!");
> >            });
> >                        $("#myForm").validate();
> >
> >        });
> >    </script>
> > </head>
> > <body>
> >
> > <FORM id="myform" 
> > ACTION="http://www.cs.tut.fi/cgi-bin/run/~jkorpela/<http://www.cs.tut.fi/cgi-bin/run/%7Ejkorpela/>
> > echo.cgi"
> > METHOD="POST">
> > <P>
> > Type something:<BR>
> > <TEXTAREA ROWS=5 COLS=72 NAME=Comments>
> > This is
> > some text
> > in several lines.
> > </TEXTAREA>
> > <p>
> > <INPUT TYPE="checkbox" NAME="box" VALUE="yes">Check me!
> > <P>
> > <INPUT Type="text" class="required email">
> > <INPUT TYPE="HIDDEN" NAME="hidden field" VALUE="something">
> > <INPUT TYPE="SUBMIT" VALUE="Send">
> > </FORM>
> > </body>
> > </html>
>

Reply via email to