silverstripe-cms/thirdparty/multifile/example.html
Ingo Schommer e7f61e1aa4 MINOR Copied jsparty/multifile to cms/thirdparty/multifile
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@93557 467b73ca-7a2a-4603-9d3b-597d59a354a9
2011-02-02 17:52:04 +13:00

26 lines
787 B
HTML
Executable File

<html>
<head>
<!-- Include the javascript -->
<script src="multifile_compressed.js"></script>
</head>
<body>
<!-- This is the form -->
<form enctype="multipart/form-data" action="your_script_here.script" method = "post">
<!-- The file element -- NOTE: it has an ID -->
<input id="my_file_element" type="file" name="file_1" >
<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.getElementById( 'files_list' ), 3 );
<!-- Pass in the file element -->
multi_selector.addElement( document.getElementById( 'my_file_element' ) );
</script>
</body>
</html>