event.preventDefault() function not working in IE

Following is my JavaScript (mootools) code: $(‘orderNowForm’).addEvent(‘submit’, function (event) { event.preventDefault(); allFilled = false; $$(“.required”).each(function (inp) { if (inp.getValue() != ”) { allFilled = true; } }); if (!allFilled) { $$(“.errormsg”).setStyle(‘display’, ”); return; } else { $$(‘.defaultText’).each(function (input) { if (input.getValue() == input.getAttribute(‘title’)) { input.setAttribute(‘value’, ”); } }); } this.send({ onSuccess: function () { $(‘page_1_table’).setStyle(‘display’, … Read more

What’s the difference between event.stopPropagation and event.preventDefault?

They seem to be doing the same thing… Is one modern and one old? Or are they supported by different browsers? When I handle events myself (without framework) I just always check for both and execute both if present. (I also return false, but I have the feeling that doesn’t work with events attached with … Read more