Closed Bug 278407 Opened 20 years ago Closed 20 years ago

javascript submit() does not work when form field name=submit exists

Categories

(Toolkit :: Form Manager, defect)

1.7 Branch
x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 72156

People

(Reporter: bugzilla, Assigned: bugs)

References

()

Details

When an input field exists with the name="submit", the javascript
document.form.submit() doesn't work.
either
Error: document.form.submit is not a function
or
Error: uncaught exception: [Exception... "Cannot convert WrappedNative to
function"  nsresult: "0x8057000d (NS_ERROR_XPC_CANT_CONVERT_WN_TO_FUN)" 
location: "JS frame :: http://../form.php :: checkform :: line 43"  data: no]

last checked with Gecko/20050113 Firefox/1.0+
This may be the root cause of many form submit problems, as many sites name
their submit buttons "submit".
it's document.forms[0].submit() in proper javascript
Product: Firefox → Core
Whiteboard: DUPEME
(In reply to comment #1)
> it's document.forms[0].submit() in proper javascript

Changed from a named form <form name="form"> to an unnamed numerically sequenced
form as suggested. Error still exists.
can you put a simplified version of the form online , so we can have a look ?

*** This bug has been marked as a duplicate of 72156 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Product: Core → Toolkit
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.