Closed
Bug 263138
Opened 20 years ago
Closed 20 years ago
Dynamic generated FILEDS in FORM with innerHTML or createElement in DOM are not passed in the POST action URL
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: iaroslav, Unassigned)
References
Details
Attachments
(3 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Hi i want to excuse me if i did wrong by puting this error here ok this is my problem: i have a page with a FORM in which i have a <a href='javascript:addnode()> the addnode function is adding additional fields for the form this can be made by the innerHTLM or by using this mydata=document.getElementById('phones'); myparent=mydata.parentNode; newdata=document.createElement("TR"); tdone=document.createElement("TD"); inone=document.createElement("INPUT"); inone.setAttribute("type","text"); inone.setAttribute("size","20"); inone.setAttribute("name","ff_phonename"+count); tdone.appendChild(inone); newdata.appendChild(tdone); myparent.insertBefore(newdata,mydata); everything is ok in the browser but - when i press submit the new added fields are missing as parameters to the POST page this thing is working in IE - i have no javascript errors or at least firefox dont warn me about them :) Reproducible: Always Steps to Reproduce: 1. make a page with a form in it 2. insert a javascript which will be called on pressing a tag 3. the script must insert new fields with new names in the form by using DOM 4. press the submit button of the form Actual Results: new dynamic fields are missing in the POST Expected Results: i must have the names and values in the POST of the dynamically generated fields in the previous page
Comment 1•20 years ago
|
||
WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041004 Firefox/0.10.1 This test dose a get, so you can see the forms inputs in the url. I did a test with a post form on my local webserver, works fine. Reporter: please upload your whole page. I will then be able see if your javascript is adding the INPUTS to the FORM. (I suspect that it is not)
Updated•20 years ago
|
Summary: Dynamic generated FILEDS in FORM with innerHTML or createElement in DOM are not passed in the POST action URL → Dynamic generated FILEDS in FORM with innerHTML or createElement in DOM are not passed in the POST action URL
Reporter | ||
Comment 2•20 years ago
|
||
here is my function i hope you will tell me what is wrong because i have done it like is describet in DOM
Comment 3•20 years ago
|
||
Hi Iaroslav. That code sinpet dose not realy help me. I needed to see what 'phones' is, and what it's parent is, and how they relate to the relevent form. If you can, please can you provide all of the html. Another thing you can do is this. After the script has run, press Ctrl+A to select all, then right click on the document, the click on "View Selection Source". This will show you the html source that you code has created. Please check that the inputs are inside the form. Gary
Reporter | ||
Comment 4•20 years ago
|
||
Hi again and very big thanx for the support - i really appreciate what you are doing :) in brief i am inserting before <tr id=phones height=4><td colspan=3></td></tr> this <tr><td><input xxxx></td><td> </td><td><input xxx></td></tr> with insertBefore command you can see all this in the source file
Comment 5•20 years ago
|
||
The problem is that the form is inside the table. This is invalid HTML. If you move the form outside of the table. it works. You should probaly also move the <input name="id"... outside of the table.
Reporter | ||
Comment 6•20 years ago
|
||
Yes you are so right ! now is working i want to excuse once again for your time. king regards Iaroslav Kantchev
Updated•20 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•