[ Index ] |
|
Code source de vtiger CRM 5.0.2 |
[Code source] [Imprimer] [Statistiques]
(pas de description)
Poids: | 156 lignes (4 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 1 fois |
Nécessite: | 0 fichiers |
MultiSelector( list_target, max ) X-Ref |
Convert a single file-input element into a 'multiple' input list Usage: 1. Create a file input element (no name) eg. <input type="file" id="first_file_element"> 2. Create a DIV for the output to be written to eg. <div id="files_list"></div> 3. Instantiate a MultiSelector object, passing in the DIV and an (optional) maximum number of files eg. var multi_selector = new MultiSelector( document.getElementById( 'files_list' ), 3 ); 4. Add the first element eg. multi_selector.addElement( document.getElementById( 'first_file_element' ) ); 5. That's it. You might (will) want to play around with the addListRow() method to make the output prettier. You might also want to change the line element.name = 'file_' + this.count; ...to a naming convention that makes more sense to you. Licence: Use this however/wherever you like, just don't blame me if it breaks anything. Credit: If you're nice, you'll leave this bit: Class by Stickman -- http://www.the-stickman.com with thanks to: [for Safari fixes] Luis Torrefranca -- http://www.law.pitt.edu and Shawn Parker & John Pennypacker -- http://www.fuzzycoconut.com [for duplicate name bug] 'neal' |
Généré le : Sun Feb 25 10:22:19 2007 | par Balluche grâce à PHPXref 0.7 |