Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How could I disable onclick action of html:image ?  RSS feed

Alejandro Guzman
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";
return true;
else ( trim(usuario.value) == "" )
return false;

Thanks in advance,

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!