I'm trying to write a so-called bookmarklet for a specific web app and
am having some difficulty. One of the names of a specific forms
inputs is submit. As such, doing
document.getElementById('whatever').submit() doesn't work in FireFox
(it works in IE) because submit is now referring to the input field -
not to the function.
The usual "change the input's name" doesn't work because I don't have
any control over the site / web app. That's why I'm trying to write
the bookmarklet in the first place.
I've observed that document.getElementById('whatever').submit.click()
works in FireFox, but it doesn't work in IE. Now, I can do if
(document.getElementById('whatever').submit)) to decide which one I
want to do, but I'm wondering if there's a better way.
For example, maybe there's a way to get the input by the name? eg. a
getInputByName() function? Or maybe there's a way to execute the
submit() function without actually calling
getElementById('whatever').submit()?