hi, i have a problem with the validation of my inline datatable. i used a jquery.validationEngine.js the error message should be displayed only if the field is empty but even if the field is not empty the message is displayed and not in the right row
the script:
$(document).ready(function(){
// binds form submission and fields to the validation engine
$("#example").validationEngine('attach');
});
function saveRow ( oTable, nRow )
{ var aData = $('#example').dataTable().fnGetData(nRow);
var jqInputs = $('input', nRow);
$('#example').dataTable().fnUpdate( '<input type="checkbox" name="Datainterests">', nRow, 0, false );
$('#example').dataTable().fnUpdate( jqInputs[1].value, nRow, 1, false );
$('#example').dataTable().fnUpdate( jqInputs[2].value, nRow, 2, false );
$('#example').dataTable().fnUpdate( jqInputs[3].value, nRow, 3, false );
$('#example').dataTable().fnDraw();
if(jQuery('#example').validationEngine('validate')){
$.ajax({
type:"POST",
url:"saveMaster.action",
data:jQuery.parseJSON( JSON.stringify({itemid: aData[1], description: aData[2], value:aData[3] })),
dataType:"json",
success:function(msg){
alert( "Data Saved: " + msg );
}
}); }
page.jsp
<td class="validate[required] text-input" name="req" id="req" >
and i used :
jquery.validationEngine.js,
validationEngine.jquery.css,
template.css,
jquery-1.6.min.js,
jquery.dataTables.editable.js
Does anyone have similar problems or know, how to make it work? that would be great!
Greetings