multiple-select

How can I send an array to php through ajax?

I want to send an array constructed in javascript with the selected values of a multiple select. Is there a way to send this array to a php script using ajax? ...

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

Hey there, 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 u...

How to post the selections of an HTML List Box with multiple selected values

I have a listbox on an HTML form with a Submit button. The listbox has multiple selection enabled. I am able to select multiple values in the listbox, but I don't know how to figure out what values were selected when the form is submitted. Also, I am adding user generated values to the list box dynamically using JavaScript, and I woul...

How to use SqlDataReader if I'm having more than one select statements in a stored procedure

I have coded three select statements in stored procedure in Microsoft SQL Server 2005. Both select statements return multiple number of records and table list for select statements is different. One select records from a master table and the other from a child table. In C# code I want to get all these records and put all the data in one ...

receive Multiple values with MVC action method from Multi Select listbox

Hello, I am rather new to MVC. I am trying to post data (An array of type "SurveyAnswer") to a MVC action method from an HTML form. Everything works fine with I pass back data from a html input that has a single value, such as a Html.TextBox(), but when the html input has multiple values such as Html.ListBox(), the action method in my ...

Selecting Multiple Options creates Multiple Inputs

I have a select field in a form that allows you to select multiple options. I need to create a new input textbox for every number of options selected, automatically. For example, if you select on option in the select box, one input will appear below it. If you select 5, 5 inputs will appear below it. I'm not sure if this can be done ...

How to populate a field based on selection in previous field?

In the form that we designed, we have a "States" field that allows its users to select multiple states at a time. There is a "City" field which should be populated as per the selection in the "State" field. The values in the "City" field are correctly populated if only one state is selected. However, it is not showing correctly when mult...

C# Linq-to-SQL Trying to recive multiple selects

Hello! I got this SQL code in a SP: (MS SQL 2008) DECLARE @type tinyint SELECT @type = Type FROM Contents WHERE ContentID = @ContentID SELECT [ParentContentID], [Headline], [ShortDescription], [CategoryID], [Type], [State], [DatePublished], [Name] FROM Contents INNER JOIN Users ON Users.ID = Contents.PublishedBy WHERE ...

How to deal with multiple values of <select> in PHP?

<select id="industryExpect" multiple="multiple"> <option value="1">item1</option> <option value="2">item2</option> <option value="3">item3</option> ... </select> I'm seeing something like : industryExpect=13&industryExpect=17&industryExpect=19 Say,there are multiple value with the same KEY, How to retrieve them from $_POST in PHP? ...

What will you do to optimize MySQL performance in this case?

$query = "select * from a ..."; if($result = mysql_query($query,$con)) {while($row = mysql_fetch_array($result);) $arr[0][] = $row; } $query = "select * from b ..."; if($result = mysql_query($query,$con)) { while($row = mysql_fetch_array($result);) $arr[1][] = $row; } $query = "select * from c ..."; if($result = mysql_query($query,$...

Rails multiple select box issue for search

First off here is my model, controller, view: My model, this is where I have my search code:--------------------------- def self.find_by_lcc(params) where = [] where << "category = 'Land'" unless params[:mls].blank? where << "mls = :mls" end unless params[:county].blank? where << "county = :county" end unless params[:acreage_range].b...

Problem implementing a UITableView that allows for multiple row selections

This - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; if (cell.accessoryType == UITableViewCellAccessoryNone) { cell.accessoryType = UITableViewCellAccessoryCheckmark; } else { cell.accessoryType = UITableViewCellA...

How to indicate to user that a command affects a subset of a multiple selection?

Here is an example that illustrates my question. I have a program that lists 1000 items. I select 10 of 1000 items. The program enables a button indicating that a command is available for my selection. I click the button, and a window appears. I make some change in the window and click OK. The command changes 5 of the 10 items in my ...

PHP email form multiple select

I'm trying to set up a simple PHP contact form for a website and I need some help modifying the PHP to list multiple items from a select menu and would appreciate the help. I'm a graphic designer, not a developer, so a lot of this is way over my head. This is the problem area here: <label for="Events[]">Which Event(s) Will You Be At...

Problem with multiple select removing more than 1 option

Ok, there seems to be a problem with the JS Code for Opera browsers, as it only removes the last option tag that is selected within a multiple select tag, can someone please help me. Here is the HTML for this: <select id="actions_list" name="layouts" multiple style="height: 128px; width: 300px;"> <option value="forum">forum</option...

Remove initial selected item in jQuery ASM select

Hello, I am using the rather fantastic jQuery multiple select plugin, ASM select This plugin is so close to my needs I have to try and fix the one and only bug I can find. On initial load, the selector checks for any elements that have the attribute "selected" and selects them. This is good, except when nothing has the attribute "sele...

How do I allow a user to select zero options from a multiple selection box in rails?

I have a settings model with a column options, and set it to serialize with serialize :options. In my view, I have a multiple selection box, using select("settings", "options", ['option1','option2','option3'], {}, :multiple => true) which works fine so long as the user selects at least one option. However, if they don't select any opti...

Returning values from multiple selection ListView

Edit: Okay, I found a solution. Don't know that it's the proper solution, but it does work correctly. Added to the code below. I'm trying to allow a user to select a number of directories from a checklist, and return them upon clicking a "Submit" button. Here's a snippet of my code. It populates the ListView with all the directories on ...

Grails: Load data on one ComboBox depending on another

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 ...

Grails: Add value of two g:select to a HTML multiple select list

I have two g:select comboboxes that I want to add to the multiple select list when clicking an image. Here is the function in javascript: function addToList(list,firstOpt, secOpt) { var y = document.createElement('option'); y.text = firstOpt + ' - ' + secOpt; y.value = firstOpt+'-'+secOpt...