(Sorry if this appears twice)
Hi,
I know this has probably been beaten to death but
I was working with Class by Stickman --
http://www.the-stickman.com which uses DOM to
create multiple file input elements in a form.
I'm trying to just hide all the form input elements
of type file and providing a link to call each one's
click() method. This works fine except when submitting
the actual form. IE 6 complains with "Access is denied"
Try copy/pasting the HTML below (don't forget the
attachment) and if you click the regular "Browse..."
button and submit then it works.
If you click the "My Browse..." link, select one file,
and try to submit, get "Access is denied"
Windows XP Pro SP2 with IE 6
<html>
<head>
<script src="multifile_ compressed.js"> </script>
<script language="Javas cript">
function myBrowse() { document.form1. file_1.click(); }
</script>
</head>
<body>
<a href="javascrip t:document.form 1.submit()">Sub mit Me</a>
&nb sp;
<a href="javascrip t:myBrowse()">M y Browse</a>
<br><br>
<form name="form1"
enctype="multip art/form-data"
action="javascr ipt:alert('it works!!')"
method="post">
<input id="my_file_ele ment" type="file" name="file_1" > <!-- The
file element -- NOTE: it has an ID -->
<input type="submit">
</form>
Files:
<!-- This is where the output will appear -->
<div id="files_list" ></div>
<script>
<!-- Create an instance of the multiSelector class, pass it the
output target and the max number of files -->
var multi_selector = new MultiSelector( document.getEle mentById(
'files_list' ), 5 );
<!-- Pass in the file element -->
multi_selector. addElement( document.getEle mentById(
'my_file_elemen t' ) );
</script>
</body>
</html>