I am using jQuery validate rule with data attributes, which is working fine but once required field is validated, rest of jquery code doesn't work. So it does validate ItemID, but after that success function doesn't work.
Here is the code:
HTML
<input type="text" name="itemID" id="itemID" class="required" data-rule-required="true" data-msg-required="Please enter an item to search">
Jquery
<script>
$(document).ready(function()
{
var validator = $("#Form").validate(
{
errorClass: 'validateError',
errorContainer: ".EmphasisDanger",
wrapper: "li"
},
success: function(){
stItems = $('#itemID').val().replace(/(?:\r\n|\r|\n)/g, ',');
document.Form.target='_parent';
document.Form.action='/admin/system/index.cfm?JobIDs=' + stItems;
document.Form.submit();
});
});