Closed Bug 367544 Opened 18 years ago Closed 18 years ago

Javascript created input text / selects aren't being passed with post or get form if script is above form tag

Categories

(Core :: General, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 178258

People

(Reporter: jacob.feuerbach, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1

I created a dynamically generated table which adds select boxes and text boxes to each row of the table using javascript.  The table resides within the form tags but the javascript is above the form.  When submitting the form via post or get the inputs are not passed to the action page.  When moving the code within the form tag, the values are passed.  This worked in IE 7

Reproducible: Always

Steps to Reproduce:
1.Javascript that creates select box from an action is above the form tag
2.action occurs, creates the select box
3. form is submitted
4. variables are not passed
5. move form tag above script
6. create input and submit, variables are passed
Actual Results:  
The first submit didn't pass the variables via get or post

Expected Results:  
Should have passed the variables which were being created within the form tags
<script>code that creates input</script>
<form>
  <table>
    script creates input inside table inside form
  </table>
</form>
Could you please attach a testcase that demonstrates what you are seeing (with the "Add an attachment" link)? That way we can be sure what the actual problem is (from the pseudo-code in comment 1, I'd say bug 178258, which could be wildly different than your actual problem).
Component: Form Manager → General
OS: Other → All
Product: Firefox → Core
QA Contact: form.manager → general
Hardware: PC → All
Version: unspecified → 1.8 Branch
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.