multiple-select

allow new values with chosen.js multiple select

↘锁芯ラ 提交于 2019-11-28 16:20:00
I'm using the chosen.js plugin http://harvesthq.github.com/chosen/ with jQuery to allow the user to select multiple options from a select. However, I now want to be able to let them create values that aren't already present - any idea how to go about this? EDIT: something similar to SO's own tag selection/creation bar would be close to what I'm after Preferably without changing or editing the plugin, but will do if required. The code: HTML: <p>Select something</p> <select name="theSelect[]" multiple="multiple"> <option value="First Option">First Option</option> <option value="Second Option"

Android - setSelected in OnItemClick in ListView

我的未来我决定 提交于 2019-11-28 12:42:58
I am trying to set item selected in OnItemClick event in ListView and it just wouldn't leave item selected. What am I doing wrong? lView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(@SuppressWarnings("rawtypes") AdapterView parent, View clickedview, int position, long id) { clickedview.setSelected(true); mItemsAdapter.select(position); } }); few things: 1. I am trying to implement Multiple Select on the list View. 2. I cannot extend from ListActivity because Activity extends from BaseActivity custom class already. 3. mItemsAdapter is a custom

Grails: Load data on one ComboBox depending on another

微笑、不失礼 提交于 2019-11-28 01:33:56
Let's say I have a combobox with the options GENERAL, AIR, GROUND, and SEA <g:select name="group" from="${['GENERAL', 'AIR', 'GROUND', 'SEA']}" valueMessagePrefix="default.category" value="${tipoN}" /> And then another combobox that loads certain information depending whether you select GENERAL, AIR, GROUND, or SEA. Let's say GROUND has 3 options, FedEx, USPS, DHL , but AIR has complete different ones, AIRPLANE, JET, HOT AIR BALLOON . The name of the other <g:select> should be "commodity" I thought about creating a javascript file and treating everything like HTML but I did some google

Android - setSelected in OnItemClick in ListView

本秂侑毒 提交于 2019-11-27 19:27:02
问题 I am trying to set item selected in OnItemClick event in ListView and it just wouldn't leave item selected. What am I doing wrong? lView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(@SuppressWarnings("rawtypes") AdapterView parent, View clickedview, int position, long id) { clickedview.setSelected(true); mItemsAdapter.select(position); } }); few things: 1. I am trying to implement Multiple Select on the list View. 2. I cannot extend from ListActivity

Javascript Get Values from Multiple Select Option Box

爱⌒轻易说出口 提交于 2019-11-27 01:49:36
This one is driving me nuts. It’s got to be something simple and stupid that I am overlooking. I have a multiple select box in a form. I am just trying to get the values that are selected. In my loop, if I use alert then I have no problem. As soon as try to concatenate the values I get the error ‘SelBranch[...].selected' is null or not an object <form name="InventoryList" method="post" action="InventoryList.asp"> <select name="SelBranch" class="bnotes" size="5" multiple="multiple"> <option value="All">All</option> <option value="001 Renton">001 Renton</option> <option value="002 Spokane">002

Javascript/jQuery: Set Values (Selection) in a multiple Select

不羁的心 提交于 2019-11-26 20:14:46
I have a multiple select: <select name='strings' id="strings" multiple style="width:100px;"> <option value="Test">Test</option> <option value="Prof">Prof</option> <option value="Live">Live</option> <option value="Off">Off</option> <option value="On">On</option> </select> I load data from my database. Then I have a string like this: var values="Test,Prof,Off"; How can I set this Values in the multiple select? Already tried change the string in an array and put it as value in the multiple, but doesnt work...! Can someone help me with this? THANKS!!! Iterate through the loop using the value in a

Is it possible to configure a UITableView to allow multiple-selection?

China☆狼群 提交于 2019-11-26 17:31:19
For the iPhone, is it possible to configure a UITableView such that it will allow multiple-selection? I've tried overriding -setSelected:animated: for each UITableViewCell, but trying to fudge the required behavior is tricky as it's difficult to separate the real unselections from the ones where the UITableView thinks I've unselected due to selection of another cell! Hope someone can help! Thanks, Nick. z8000 The best way to do this would be to a checkmark per selected row. You can do that by setting the accessoryType on the selected UITableViewCell instances to

Javascript/jQuery: Set Values (Selection) in a multiple Select

北慕城南 提交于 2019-11-26 06:36:10
问题 I have a multiple select: <select name=\'strings\' id=\"strings\" multiple style=\"width:100px;\"> <option value=\"Test\">Test</option> <option value=\"Prof\">Prof</option> <option value=\"Live\">Live</option> <option value=\"Off\">Off</option> <option value=\"On\">On</option> </select> I load data from my database. Then I have a string like this: var values=\"Test,Prof,Off\"; How can I set this Values in the multiple select? Already tried change the string in an array and put it as value in