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/
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