Hello, I have a problem:
I writing an event handler for invalid input from a html form element in order to get a validation on real time:
FFormulario1 :=
TJSHTMLFormElement(document.getElementById('informacion1'));
FFormulario1.oninvalid ;before I defined
function Form2Validacion(aEvent: TJSEventhandler): Boolean;
begin
window.alert('Hay un campo con valores incorrectos!!!');
end;knowing in web.pas say:
TJSHTMLFormElement = class external name 'HTMLFormElement' (TJSHTMLElement)
TJSHTMLElement = class external name 'HTMLELement' (TJSElement)
public
oninvalid : TJSEventhandler;
...but Lazarus in compile time shut me:
project1.lpr(262,28) Error: Incompatible type arg no. 1: Got "TEventListenerEvent", expected "TJSEventHandler"
if I change to:
function Form2Validacion(aEvent: TEventListenerEvent): Boolean;and then Lazarus compiles Ok!!!
but my browser claim to me with all justice:
TypeError: $mod.FFormulario1 is null!!!!
it will be an Error???
Thanks
pp
