I have a problem when calling this function:
function dobleevent(obj){
if (document.total.motivo.value){
document.total.resumen.click();
document.total["modificar"][0].click();
} else{
alert("TextArea Empty");
return false;
}
}
With this HTML:
<input class="boton1" name="modificar"
type="button" id="modificar" value="Modificar"
onclick="dobleevent(this);">
The problem is that it only executes the first click method and it does not executes the next one. Why?
I would really advise you to use Unobtrusive JavaScript. That way you can make a difference between HTML and JavaScript.
Maybe using a framework such as jQuery.
So it would be:
HTML:
JavaScript: