Skip to main content

Bug Tracker

Side navigation

Ticket #4470: dummy.html
File dummy.html, 1.4 KB (added by rabusmar, April 01, 2009 10:35PM UTC)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Foobar</title>

<script type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<!--script type="text/javascript" src="js/jquery.form.js"></script-->
<script type="text/javascript" src="js/jquery.validate.min.js"></script>
<!--script type="text/javascript" src="js/additional-methods.js"></script-->
<!--script type="text/javascript" src="js/messages_es.js"></script-->
</head>

<body>
<script type="text/javascript">
$(function() {
    $("#main input.cancel").click(function() {
        $("#dummy").val("");
        //$("#main").valid(); // the form sends even uncommenting this line
    });
    $("#main").validate({
        submitHandler: function(form) {
            alert("Submitted!");
        }
    });
    //$("#dummy").val("foobar");
});
</script>
<form id="main" method="post" action="dummy.php">
    <fieldset>
        <legend>Dummy form</legend>
        <div>
            <label for="dummy">Dummy field:</label>
            <input type="text" name="dummy" id="dummy" class="required" />
        </div>
        <div>
            <input type="submit" value="Send" class="submit" />
            <input type="button" value="Cancel" class="cancel" />
        </div>
    </fieldset>
</form>
</body>
</html>

Download in other formats:

Original Format