Subj : Re: event.returnValue To : netscape.public.mozilla.jseng,netscape.public.mozilla.dom From : Martin Honnen Date : Fri May 06 2005 08:58 pm Note crosspost/followup-to netscape.public.mozilla.dom Carlos Barcellos wrote: > I'm using a function to override the "onreset" event for a
. > > Under IE if inside my function i do the following: > > function myOnReset() { > event.returnValue=false; > } > > This acts as I want, the browser does not clear my form and let me do > whatever I want. > > My problem is, this doesn't work under FireFox. Any suggestions? IE has a global event object while Firefox uses an event argument e.g. where the function then looks as follows (to work with both IE and Firefox and other browsers that implement the W3C DOM: function myOnReset (evt) { if (evt.preventDefault) { evt.preventDefault(); } return false; } -- Martin Honnen http://JavaScript.FAQTs.com/ .