Bug Tracker

Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#3615 closed bug (worksforme)

Validation plugin does not show errors on form in IE if <button> is used instead of <input type="submit"

Reported by: primski Owned by: joern
Priority: minor Milestone: 1.3
Component: plugin Version: 1.2.6
Keywords: validation, plugin, ie Cc: primski
Blocked by: Blocking:

Description

In Internet Explorer, test in v6 and v7, validation plugin does not show errors if form submited is not valid and <button> is used instead of <input type="submit"...

example:


<html> <head>

<meta http-equiv="Content-Type" content="text/html; charset=UTF8" />

<script language="javascript" type="text/javascript" src="jquery-1.2.6.min.js"></script> <script language="javascript" type="text/javascript" src="jquery.validate.js"></script>

<script> $(document).ready(function() {

$("#theForm").validate({

rules: {

field1: "required"

}

});

});

</script>

</head> <body>

<form id="theForm" action="" method="GET">

<input type="input" name="field1" />

<button name="save">Save button</button> <input type="submit" name="save2" />

</form>

</body> </html>


Clicking on <button> no erorrs show up, although if form is valid it gets submited with no problems. Clicking on <input type="submit"> everything works as intended.

Change History (2)

comment:1 Changed 14 years ago by flesler

Cc: primski added
Owner: set to joern

comment:2 Changed 14 years ago by joern

Resolution: worksforme
Status: newclosed

Add type="submit" to your button element.

Note: See TracTickets for help on using tickets.