Karim Mtl Karim Mtl - 4 months ago 29
jQuery Question

Error while using jquery validation engine

I am trying to debug an old application and I created a separate html to debug jquery validation engine behavior.

I am getting this error:

jquery.validationEngine.js:28 Uncaught TypeError: $(...).on is not a function

This error points to line 28 of jquery.validationEngine.js

Here is my file:

<link rel="stylesheet" href="jQuery-Validation-Engine/css/validationEngine.jquery.css" type="text/css"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.js" type="text/javascript"></script>
<script src="/jQuery-Validation-Engine/js/languages/jquery.validationEngine-en.js" type="text/javascript" charset="utf-8"></script>
<script src="/jQuery-Validation-Engine/js/jquery.validationEngine.js" type="text/javascript" charset="utf-8"></script>
// binds form submission and fields to the validation engine
$("#myform").validationEngine('attach', {promptPosition : "centerRight"});

<form method="post" name="myform" id="myform" action="processmyform.php">
<label>First name</label>
<input type="text" name="first_name" id="first_name" class="validate[required]" />
<label>Last name</label>
<input type="text" name="last_name" id="last_name" class="validate[required]" /><br>
<input type="submit" name="submit" value="Submit"/>



You're using jQuery 1.4.4 but the .on() function was added in version 1.7