Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Prevent Form Submission In Firefox Using addEventListener

Avatar of rdivilbiss
rdivilbissFlag for United States of America asked on
JavaScriptWeb DevelopmentScripting Languages
17 Comments1 Solution2477 ViewsLast Modified:
If I use an inline event, onsubmit="..." and return false to the event it will prevent W3C compliant and IE 8,7,6,etc. browsers from submitting the form.

InLine: http://www.rodsdot.com/formInline.asp

But I can not use an inline event declaration for this project.

So I add the event listeners after page load:

Event Listeners: http://www.rodsdot.com/formEventListener.asp

That works for IE 8 and below but not Firefox.

If I change the addEventlistener to use an anonymous function it still works in IE 8 and below but not Firefox.

Listener w/Anon Func:  http://www.rodsdot.com/formEventListenerAnonFunc.asp

What am I missing or is it documented somewhere that the submit event can not be canceled using W3C  event handling?
ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Commented:
This problem has been solved!
Unlock 1 Answer and 17 Comments.
See Answers