<div dir="ltr">Hello, I have a problem:<br>I writing an event handler for invalid input from a html form element in order to get a validation on real time:<br><br>FFormulario1 := TJSHTMLFormElement(document.getElementById('informacion1'));<br>FFormulario1.oninvalid :=@Form2Validacion; <br><br>before I defined<br><br>function Form2Validacion(aEvent: TJSEventhandler): Boolean;<br>begin<br> window.alert('Hay un campo con valores incorrectos!!!');<br>end;<br><br>knowing in web.pas say:<br> TJSHTMLFormElement = class external name 'HTMLFormElement' (TJSHTMLElement) <br> <br> TJSHTMLElement = class external name 'HTMLELement' (TJSElement) <br> public<br> oninvalid : TJSEventhandler;<br> ... <br> <br>but Lazarus in compile time shut me:<br>project1.lpr(262,28) Error: Incompatible type arg no. 1: Got "TEventListenerEvent", expected "TJSEventHandler"<br><br>if I change to:<br>function Form2Validacion(aEvent: TEventListenerEvent): Boolean;<br><br>and then Lazarus compiles Ok!!!<br><br>but my browser claim to me with all justice:<br>TypeError: $mod.FFormulario1 is null!!!!<br><br>it will be an Error???<br><br>Thanks<br><br>pp<br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><pre style="color:rgb(0,0,0);font-variant:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px">MSc. Ing. Pedro Pablo Oviedo Vera
Dirección Técnica y Desarrollo
Empresa de Proyectos e Ingeniería del
Ministerio de la Agricultura.ENPA.
Boyeros y Conill, Piso 10 Edif MINAG
Telef. 884 7197
SIP:23000116</pre></div></div></div>