Firefox canceling problem solved
I'd like to thank Johannes Hölzl, who pointed out my stupid mistake regarding canceling form submission in Firefox:
The
ECMAScript binding for DOM Events says that the EventListener (which is the function "cancel") hasn't any returnvalue. But you get as parameter an Event object, where you can call "stopPropagation()" or "preventDefault()".
So I replaced this code:
function cancel()
{
return false;
}
with this:
function cancel(e)
{
if (e && e.preventDefault)
e.preventDefault(); // DOM style
return false; // IE style
}
and it works. I updated the test page accordingly.
Thanks a lot, Johannes!
Comment by Graham
December 8, 2005 - 14:42
just saved my behind too. thanks!