Page 1 of 1

Deleting a [Select] List item

Posted: Tue Jun 18, 2013 8:50 am
by Andy Parker

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);


Deleting a [Select] List item

Posted: Tue Jun 18, 2013 9:40 am
by Maryna Brodina

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


Deleting a [Select] List item

Posted: Tue Jun 18, 2013 9:43 am
by Andy Parker

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.


Deleting a [Select] List item

Posted: Tue Jun 18, 2013 3:04 pm
by Kateryna Grynko

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