Yes, if you have an element named submit, it will override the form's method called submit().
document.forms.login.submit() doesn't work because the submit() method belongs to the form element itself, not the submit-button element.
alert(document.forms[0]) will and should return a form object, since that's a reference to the first form element of the page.
I'm glad you got it to work!
Btw, if you make modifications to a script other than those suggested in the thread, please explain them briefly. That makes it easier to follow what you're doing without reverse-engineering the code.
