Bug Tracker

Modify

Ticket #3615 (closed bug: worksforme)

Opened 5 years ago

Last modified 14 months ago

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
Blocking: Blocked by:

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

comment:1 Changed 5 years ago by flesler

  • Cc primski added
  • Owner set to joern

comment:2 Changed 4 years ago by joern

  • Status changed from new to closed
  • Resolution set to worksforme

Add type="submit" to your button element.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.