mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
e7f61e1aa4
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@93557 467b73ca-7a2a-4603-9d3b-597d59a354a9
26 lines
787 B
HTML
Executable File
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> |