elliottmina
Programmer
I have a page that includes a form I cannot alter. I want to capture it's submission, and do some validation. My code works fine in Firefox, but nothing happens (not even an error) in IE.
Suggestions? TIA
Code:
if (window.addEventListener) window.addEventListener('submit', myFunction, true);
else if (window.attachEvent) window.attachEvent('submit',myFunction);
function myFunction(){
alert('foo');
}