Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Deleting a [Select] List item

Is there an easy method to delete an item in a SELECT list.

I have a list, have the row number in the list that I want to remove, just cant seem to find the syntax to accomplish this...

eg
// followinglist is the SELECT list
//
var followinglist = Tiggzi('following_list');
//
// followingindex is the entry I want to remove
//
var followingindex=followinglist[0].selectedIndex;
//
// Now I need to remove it, but this is not the correct syntax ??
//
followinglist.remove(followingindex);

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Deleting a [Select] List item

Hello! Please take a look here https://getsatisfaction.com/apperyio/.... Let me know if it helps.

Andy Parker
Posts: 0
Joined: Wed Mar 27, 2013 10:21 am

Deleting a [Select] List item

thanks Marina, saw that post but presumed as it was for a local storage array it didnt apply.

So just to be sure, there is no "built in" command to remove a list entry like the javascript splice() command.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Deleting a [Select] List item

Hi Andy,

Run the following JavaScript:
codevar list = Appery( "selectmenu_name" );
var index_for_remove = 3;
$( list[ index_for_remove ] ).remove;
list.selectmenu("refresh");/code

Return to “Issues”