javascript - How can I set the maximum number of object to show? -
i have following function create automatically new option if there folder inside. last folder contain html file , html going opened automatically when select parent folder. in case don't want create option.
this code create new levels want stop create new 1 once there 4 option levels created:
function processnewdfdata( respobj, $currentselectitem, strcurrentpath ) { fsstructure[strcurrentpath] = {'subfolders':[], 'subshtmls':[]}; if ( (respobj.subfolders.length > 0) || (respobj.subshtmls.length > 0) ) { for( var = 0; < respobj.subfolders.length; i++ ) { fsstructure[strcurrentpath].subfolders.push( respobj.subfolders[i] ); } for( var = 0; < respobj.subshtmls.length; i++ ) { fsstructure[strcurrentpath].subshtmls.push( respobj.subshtmls[i] ); } } rendselects( $currentselectitem, strcurrentpath ); }
Comments
Post a Comment