Closed
Bug 158676
Opened 24 years ago
Closed 24 years ago
When adding INPUT items to a form DYNAMICLY they do not get Submitted when the SUBMIT button is pressed.
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: alexander.blood, Assigned: alexsavulov)
Details
(Keywords: testcase)
Attachments
(3 files)
When adding INPUT items to a form DYNAMICLY they do not get Submitted when the
SUBMIT button is pressed.
CODE:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script>
var TotalRows = 0;
var srcHTML ='';
function RemoveChildNode(TagName, ChildName) {
var Tag = document.getElementById(TagName);
var Children = Tag.childNodes;
for (i=0; i<Children.length;i++) {
if (Children[i].name==ChildName) {
var Child = Children[i];
break;
}
}
Tag.removeChild(Child);
}
window.document.innerHTML ="";
function AddRoww(tagid) {
TotalRows+=1;
var Tag = document.getElementById(tagid);
var topChild = document.getElementById("topChild");
srcHTML= '<table>';
srcHTML+=' <tr>';
srcHTML+=' <td><font size=-1>Operator:</td>';
srcHTML+=' <td><font size=-1><Select name=rowID' + TotalRows + 'Machine
id=rowID' + TotalRows + 'Machine><option></Select></td>';
srcHTML+=' <td><font size=-1>Sheet:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'Cost id=rowID' + TotalRows + 'Cost></td>';
srcHTML+=' <td><font size=-1>Item:</td>';
srcHTML+=' <td><font size=-1><Select name=rowID' + TotalRows + 'Item
id=rowID' + TotalRows + 'Item ><option></Select></td>';
srcHTML+=' </tr>';
srcHTML+='</table>';
srcHTML+='<table>';
srcHTML+=' <tr>';
srcHTML+=' <td><font size=-1>Cost:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'Cost id=rowID' + TotalRows + 'Cost></td>';
srcHTML+=' <td><font size=-1>Machine:</td>';
srcHTML+=' <td><font size=-1><Select name=rowID' + TotalRows + 'Machine
id=rowID' + TotalRows + 'Machine><option></Select></td>';
srcHTML+=' <td><font size=-1>Comment:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'Comment id=rowID' + TotalRows + 'Comment></td>';
srcHTML+=' </tr>';
srcHTML+='</table>';
srcHTML+='<table>';
srcHTML+=' <tr>';
srcHTML+=' <td><font size=-1>Start Date & Time:</td>';
srcHTML+=' <td><font size=-1></td>';
srcHTML+=' <td><font size=-1>Duration:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'Duration id=rowID' + TotalRows + 'Duration></td>';
srcHTML+=' <td><font size=-1>Waste:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'WasteCount></td>';
srcHTML+=' </tr>';
srcHTML+='</table>';
srcHTML+='<table>';
srcHTML+=' <tr>';
srcHTML+=' <td><font size=-1>Begin:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'BeginCount></td>';
srcHTML+=' <td><font size=-1>End:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'EndCount></td>';
srcHTML+=' <td><font size=-1>Total Quantity:</td>';
srcHTML+=' <td><font size=-1><input type=text name=rowID' + TotalRows
+ 'TotalQuantity></td>';
srcHTML+=' </tr>';
srcHTML+='</table>';
srcHTML+='<input type=button id=cid' + TotalRows + 'remove
onclick=\'javascript:RemoveChildNode("contentarea","cid' + TotalRows + '");\'>';
srcHTML+='<input type=text name=ct' + TotalRows + '>';
srcHTML+='<input type=text name=ct' + TotalRows + '>';
srcHTML+='<input type=text name=ct' + TotalRows + '>';
var newTag = document.createElement('DIV');
newTag.name = 'cid' + TotalRows;
newTag.innerHTML = srcHTML;
Tag.insertBefore(newTag,topChild);
}
</script>
</head>
<body id=BODY name=BODY>
<font size=-2>
<form name=DynamicForm id=DynamicForm action=DHTMLTest.HTML method=GET>
<table>
<tr>
<td><input type=button name="Add Row" Value="Add Row"
onclick="javascript:AddRoww('contentarea');"><input type=button name="Add Row"
Value="HTML" onclick="javascript:window.alert(window.document.innerHTML);"></td>
</tr>
<tr>
<td id=contentarea name=contentarea>
<div id=topChild name=topChild>
</div>
<input type=submit>
</td>
</tr>
<table>
</div>
</form>
http://bugzilla.mozilla.org/query.cgi?GoAheadAndLogIn=1
</body>
</html>
| Reporter | ||
Comment 1•24 years ago
|
||
Comment 2•24 years ago
|
||
WFM
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1b) Gecko/20020718
Assignee: Matti → alexsavulov
Component: Browser-General → Form Submission
QA Contact: asa → vladimire
| Reporter | ||
Comment 3•24 years ago
|
||
Sören "Chucker" Kuklau -
What OS and version of the Browser are you using?
It will not show the form input items on the URL when I do the submit.
I can attach a screen shot.
| Reporter | ||
Comment 4•24 years ago
|
||
| Reporter | ||
Comment 5•24 years ago
|
||
Comment 6•24 years ago
|
||
Re: Additional Comment #3 From Alexander C. Blood 2002-07-22 10:11 -------
> What OS and version of the Browser are you using?
As my earlier comment says, I'm using Windows NT 5.1 (Windows XP) and a trunk
build of Mozilla from last week.
> It will not show the form input items on the URL when I do the submit.
> I can attach a screen shot.
It does for me.
1. I go to the attached testcase
2. I click "Add Row"
3. I enter "234897123" in the "Cost" field (left of the "Machine" field)
4. The resulting URL is
"http://bugzilla.mozilla.org/DHTMLTest.HTML?rowID1Machine=&rowID1Cost=
&rowID1Item=&rowID1Cost=234897123&rowID1Machine=&rowID1Comment=
&rowID1Duration=&rowID1WasteCount=&rowID1BeginCount=&rowID1EndCount=
&rowID1TotalQuantity=&ct1=&ct1=&ct1=" (I've added some hard line breaks
manually), so "rowID1Cost" has been set to the value entered.
Re: Comment #5 From Alexander C. Blood 2002-07-22 10:17 -------
> URL does not show the query string items that where in the form
indeed - what version are *you* using?
| Reporter | ||
Comment 7•24 years ago
|
||
I am using Build ID 2002053012.
Obsolete build (2 months old!)
WFM 2002072204/win2000.
==> WORKSFORME.
Reporter, please upgrade to a newer build and feel free to reopen this bug if
you still encounter the same problem.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → WORKSFORME
Updated•7 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•