• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How could I disable onclick action of html:image ?

 
Alejandro Guzman
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.-
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic