<font face="arial" size="2">Hi Peter,<br /><br />   The file input is a tricky beast, mostly because of security concerns.  You can't paste or otherwise add any information to a file element with Javascript; that would leave too much opportunity for malicious code.  I think in this case, you're going to have to keep that control in a different element so you aren't pulling it out and adding it again.<br /><br />Cheers,<br /><br />Peter<br /><br /></font>
                <font face="Tahoma, Arial, Sans-Serif" size="2">
                                <b>From</b>: "Peter Lauri" <a href="mailto:lists@dwsasia.com">lists@dwsasia.com</a><br /></font>
                <br />Hi,<br /><br />I have a script that adds HTML to a specific DIV with a specific ID:<br /><br />function add_morefile() {<br />var x = document.getElementById('attach_file');<br />x.innerHTML += '
<table><div class="doc_attach"></div><tbody><tr><td><label><br />for="author"&gt;Attachment file: </label></td><td><input class="big" /><br />name="doc_attach[]" id="doc_attach" type="file" class="typefile"<br />/&gt;</td></tr><tr><td><label for="File Name">File Name:<br /></label></td><td><input class="big" id="doc_filename" name="doc_filename[]" /><br />type="text" /&gt;</td></tr><tr><td><label for="File Name Author">File created<br />by: </label></td><td><input class="big" name="doc_filename_author[]" /><br />id="doc_filename_author" type="text" /&gt;</td></tr></tbody></table>';<br />}<br /><br />If the user has filled in information in the form already, all information<br />is still there except in the <input type="file" ...="" /> object. Why is that?<br /><br />If I want to add more form fields, should I use an other function to keep<br />the <input type="file" ...="" /> value?<br /><br />Best regards,<br />Peter Lauri