I have this code:
<a href="javascript:void(0);" title="Save" onclick="return validate(event, document.thisForm)"></a>
and I would like to add at runtime by JS something like this:
<a href="javascript:void(0);" title="Save" onclick="return validate(event, document.thisForm) && submitForm(document.thisForm)"></a>
My idea was doing like this but I dont know how to add AND operator:
form.addEventListener('submitForm', function (e) {
e.preventDefault();
alert('onclick handler called');
}, false);