| Author |
How could I disable onclick action of html:image ?
|
Alejandro Guzman
Greenhorn
Joined: Jan 12, 2005
Posts: 2
|
|
I am using an <html:image> tag for login submit action. I'm calling j_security_check servlet to validate user and password. The problem is if I click the image and press "enter" almost at the same time Tomcat throw me a exeception. So, what I want is disable the onclick event is actived.... Or is there any other way to solve this problem ??? html:image property="btnAceptar" on-click="return btnLogon()" border="0" bundle="Images" srcKey="imagen.boton.aceptar.src" funtion btnLogon() { var usuario = document.getElementById("j_username"); var clave = document.getElementById("j_password"); if( ( trim(usuario.value) !== "") && ( trim(clave.value) !== "") ) { document.inicioSesionFormBean.action = "/clinycas/logon"; document.inicioSesionFormBean.submit(); return true; } else ( trim(usuario.value) == "" ) { alert(""); usuario.focus(); return false; } Thanks in advance, Alejandro.-
|
 |
 |
|
|
subject: How could I disable onclick action of html:image ?
|
|
|