Cannot submit form if submit() called before onload() is fired

RESOLVED WORKSFORME

Status

()

Core
DOM: Core & HTML
RESOLVED WORKSFORME
17 years ago
17 years ago

People

(Reporter: ken spencer, Assigned: jst)

Tracking

Trunk
x86
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010913
BuildID:    2001091311

Thoe following scrip is broken in mozilla, but not in ns4, or ie.

<form name=sendForm action=foo.php>
<input type=hidden name=bar value=1
</form>

<script language=javascript>
document.sendForm.submit();
</script>

Reproducible: Always
Steps to Reproduce:
1. see above
2.
3.
DOM0.  The JS runs before the form is created, so it can't be submitted.  Moving
that call to submit() into the onload handler works wonders.
Assignee: rods → jst
Status: UNCONFIRMED → NEW
Component: Form Submission → DOM Level 0
Ever confirmed: true
QA Contact: vladimire → desale
Summary: Cannot submit form containing only hidden elements by javascript → Cannot submit form if submit() called before onload() is fired

Comment 2

17 years ago
If that's the problem, this will be fixed with bug 34297.  Adding dependency.
Depends on: 34297
*** Bug 92948 has been marked as a duplicate of this bug. ***

Comment 4

17 years ago
Created attachment 56373 [details]
Testcase

Comment 5

17 years ago
2001103113 Linux worksforme
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.