Mainly the problem is as follows:
Suppose you try to validate a form by means of Javascript. Suppose you decide you want to do it using W3C DOM. That means the clean way would be to attach the form some validation function on the "submit" event. Ideally the function returns false on some validation error and you can then break the forms submit.
Ideally. In real life if you attach the event with the addEventListener() DOM function it won't work. (in Firefox at least, under no combination of parameters)
BUT
if you use direct attribution "form.onsubmit = function" it works.
No idea why this happens. It's an open question. Any suggestions are welcome, thank you very much!
Comentarii