Solved

How to split a string in a column and have it show up in the search drop down box at the footer search box.

Posted on 2014-04-23
1
214 Views
Last Modified: 2014-05-13
take this example here: http://www.datatables.net/examples/api/multi_filter_select.html, now suppose i want to keep Win 98+ / OSX.2+ show up in the platform column but underneath in the drop down box I want it to show Win 98+  in one row and OSX.2+ in the other.
0
Comment
Question by:cbrune
1 Comment
 
LVL 52

Accepted Solution

by:
Scott Fell,  EE MVE earned 500 total points
ID: 40018604
I wouldn't do a 2nd row.  But you can add on to the select in the function fnCreateSelect.  I have a working example here http://jsbin.com/woyem/1/edit. You can either hard code it or generate via your serverside code.  You can also adjust how the data is pulled for the drop down and just use the first 3 letters.

	
			function fnCreateSelect( aData )
			{
				var r='<select><option value=""></option>', i, iLen=aData.length;
				for ( i=0 ; i<iLen ; i++ )
				{
					r += '<option value="'+aData[i]+'">'+aData[i]+'</option>';
				}
// ADD VIA SERVER SIDE CODE or HARD CODE
              r += '<option value="Win">Win</option>'
              r += '<option value="OSX">OSX</option>'
				return r+'</select>';
			}
			

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Julian Matz As of jQuery (http://jquery.com/) 1.4 the .live() method (http://api.jquery.com/live/) supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question