<script language="javascript">
function myValidate(f) {
if (document.formvalidator.isValid(f)) {
f.task.value='save';
f.submit();
}
else {
alert('Error!');
return false;
}
return false;
}
</script>
Putting form action as : : below
<form action="index.php" onsubmit="return myValidate(this);" class="form-validate" method="post" name="adminForm" id="adminForm">
Its working on this comment submit button very fine, not on save & Close in joomla
<!--<input type="submit" name="submit" id="submit" value="submit" />
-->
<input type="hidden" name="option" value="com_result" />
<input type="hidden" name="id" value="<?php echo $this->result->id; ?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="controller" value="result10" />
Not working in Joomla Component.Saving the form On Ok Button of Error Alert. any suggestion ?