Bendude14 Posted July 21, 2008 Share Posted July 21, 2008 I want to be able to select more than one item so a drop down box is not possible for this...i dont think. I have seen it online where there is a scrolling list on the left and you can select multiple values and when you click add they move to a box on the right which i will then update to the DB when submitted I dont even no what you would call this so was finding it hard to google. thanks Ben Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/ Share on other sites More sharing options...
.josh Posted July 21, 2008 Share Posted July 21, 2008 you select more than 1 by ctrl clicking items. As far as your 2nd question, that's somethin' done with javascript. Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/#findComment-595223 Share on other sites More sharing options...
Bendude14 Posted July 21, 2008 Author Share Posted July 21, 2008 you can't select more than one in a drop down box though? What are the list boxes called? Thanks for the quick reply Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/#findComment-595224 Share on other sites More sharing options...
.josh Posted July 21, 2008 Share Posted July 21, 2008 I'm not sure that it's called anything special... you just add the multiple tage inside your select and make the name an array. example: <?php if ($_POST) { print_r($_POST); } ?> <br /> <form action = '' method = 'post'> <select name = 'blah[]' multiple> <option value = 'a'>a</option> <option value = 'b'>b</option> <option value = 'c'>c</option> </select> <input type = 'submit' value = '>>'> </form> Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/#findComment-595227 Share on other sites More sharing options...
unkwntech Posted July 21, 2008 Share Posted July 21, 2008 The second is definetly JavaScript and it looks somthing like this: <script language="javascript"> function copyChoices() { document.getElementByID('select').innerHTML = document.getElementByID('select2').innerHTML; } </script> <form name="form1" method="post" action=""> <label> <select name="select" size="5" multiple id="select"> <option value="1">Item1 </option> <option value="2">Item2</option> <option value="3">Item3</option> <option value="4">Item4</option> <option value="5">Item5</option> <option value="6">Item6</option> <option value="7">Item7</option> <option value="8">Item8</option> <option value="9">Item9</option> <option value="10">Item10</option> </select> </label> <label> <input type="submit" name="button" id="button" value=">" onClick="copyChoices()"> </label> <label> <select name="select2" size="5" id="select2"> </select> </label> </form> As usual this is rough but this is basicly how it should be. To select multiple you must have the multiple in the tag <select name="select" size="5" multiple id="select"> Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/#findComment-595228 Share on other sites More sharing options...
PFMaBiSmAd Posted July 21, 2008 Share Posted July 21, 2008 The proper syntax for multiple in a select list is: multiple = "multiple" Here is a link to an existing and very nice script to do the left/right copy select boxes - http://www.javascripttoolbox.com/lib/selectbox/examples.php Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/#findComment-595244 Share on other sites More sharing options...
Bendude14 Posted July 21, 2008 Author Share Posted July 21, 2008 Thanks for the helps guys. Thats exactly what i needed. Ben Quote Link to comment https://forums.phpfreaks.com/topic/115782-solved-whats-this-called/#findComment-595259 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.