Search the Community
Showing results for tags 'muliple'.
-
I need some assistance changing a single select into a multiple select form drop-down. I am having issues with the multiple selections storing. Thank you for your help! $var = " <script type='text/javascript'> jQuery(function(){ jQuery('form').attr('method', 'get'); jQuery('form').after('<input type=\"submit\" id=\"doaction_k2\" class=\"button-secondary action\" value=\"Apply Folder Access\" style=\"background: red; color: #fff;\">'); var thisurl = ''; var thaturl = ''; jQuery('#doaction_k2').live('click', function(){ jQuery('.new_file_access').each(function(){ thisurl = thisurl + '|' + jQuery(this).attr('userid') + '~' + jQuery(this).val(); }); jQuery('.new_file_readwrite').each(function(){ thaturl = thaturl + '|' + jQuery(this).attr('userid') + '~' + jQuery(this).val(); }); jQuery.post(document.URL, { update_access: 1, file_access: thisurl, file_readwrite: thaturl }, function(){ window.location = document.URL; }); return false; }); }); </script>"; } $var .= "<select multiple='yes' id='file_manager_accessk".$user_id."[]' class='new_file_access' userid='$user_id'><option value='' $noaccess>No Access</option>"; foreach($ACCESS_ARRAY as $key=>$value) { $key = str_replace('\\', '/', $key); $keys = $key .'~'. $urls.'/'.$value; $keys = substr($keys, 0, strlen($keys)-1); $keys1 = base64_encode($keys); $var .= "<option value='$keys1' $select[$keys]>$value</option>"; } $var .= "</select>"; return $var; ~ Sarah