jquery autocompolete multiselect

dear all
i jave a jquery autocomplete multiselect how to return the selection values into array
pamela rizkDeveloperAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
pamela rizkConnect With a Mentor DeveloperAuthor Commented:
i solved my problem using
Regex.Split(_k, ", ")
0
 
pamela rizkDeveloperAuthor Commented:
dear all

i select 1, test
then 2 'test2'
i need to fill into an array these 2 values
please help
0
 
pamela rizkDeveloperAuthor Commented:
any news?
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Julian HansenCommented:
Please post your code.
0
 
leakim971PluritechnicianCommented:
check this page : https://jqueryui.com/autocomplete/#multiple
look at source of the example
check this lines :
        select: function( event, ui ) {
          var terms = split( this.value );
          // remove the current input
          terms.pop();
          // add the selected item
          terms.push( ui.item.value );
          // add placeholder to get the comma-and-space at the end
          terms.push( "" );
          // terms is an array, we create a CSV string to update the value of the input
          this.value = terms.join( ", " ); 
          return false;
        }

Open in new window


You see terms is your array
0
 
pamela rizkDeveloperAuthor Commented:
terms is the array separated by ", " but what if ui.item.value contains a value with , "?
0
 
leakim971PluritechnicianCommented:
Nothing... A string is not an array...
0
 
pamela rizkDeveloperAuthor Commented:
I he the below string

dim k as string="Employee1, Boutros William Ton,Partner, Employee2, "

i am splitting this string as below :
  Dim NameValue As String =k
        Dim Nameelements() As String = NameValue.Split(New Char() {",  "}, StringSplitOptions.RemoveEmptyEntries)

but the output is not correct

i need the output to be an array with 3 columns :
Employee1
Boutros William Ton,Partner
Employee2

how to do that
0
 
Julian HansenCommented:
What output are you getting?

Note in this line you have a trailing comma
dim k as string="Employee1, Boutros William Ton,Partner, Employee2, "

Open in new window

This will result in an array of 4 items.
0
 
pamela rizkDeveloperAuthor Commented:
ok
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.