llebron
03-17-2005, 01:34 PM
I am working on a flash application to manage users. When the form loads up it creates a combo box with the name of all the users. Here's the code
function get_users_Result(result) {
length = result['items'].length;
getItems_cb.addItem({label:' -- Please select a user --'});
for($i=0; $i < length; $i++)
{
getItems_cb.addItem({label:result['items'][$i]['First_Name']+' '+ result['items'][$i]['Last_Name'], data:result['items'][$i]['UserID']});
}
}
get_users = users.get_users("");
This works. However, when I add or delete an user I want to regenerate the combo box. I tried the following code but the combo box does not get regenerated, eventhough the get_users method gets called.
function add_user_Result(result) {
trace(result);
get_users = users.get_users("");
}
Any help would be greatly appreciated.
thanks
Luis :confused:
function get_users_Result(result) {
length = result['items'].length;
getItems_cb.addItem({label:' -- Please select a user --'});
for($i=0; $i < length; $i++)
{
getItems_cb.addItem({label:result['items'][$i]['First_Name']+' '+ result['items'][$i]['Last_Name'], data:result['items'][$i]['UserID']});
}
}
get_users = users.get_users("");
This works. However, when I add or delete an user I want to regenerate the combo box. I tried the following code but the combo box does not get regenerated, eventhough the get_users method gets called.
function add_user_Result(result) {
trace(result);
get_users = users.get_users("");
}
Any help would be greatly appreciated.
thanks
Luis :confused: