Sorry Kevin. My app is on the intranet - I can't put it on the internet. The
best I can do is attach the captured interface.

On 20/04/07, Kevin Aebig <[EMAIL PROTECTED]> wrote:
>
> On initial appearance, this should work as there are no glaring errors in
> your actionscript. Can you put it up somewhere accessible to send me the
> URL?
>
> !k
>
> -----Original Message-----
> From: George Lu [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 18, 2007 7:08 PM
> To: CF-Talk
> Subject: Re: Flash Forms: ComboBox help
>
> Thank you Kevin.
>
> Here is the code in the form:
>
>             <cfformgroup type="vbox">
>                 <cfformitem type="text" style="fontWeight:bold;
> color:##235986;">Category: </cfformitem>
>                 <cfselect name="Category" label="" query="qGetCategory"
> value="CategoryID" display="Category" queryposition="below"  width="180"
> size="#listSize#" />
>                 <cfformitem type="spacer" height="20" />
>                 <cfinput type="text" name="edit_Category" bind="{(
> Category.selectedItem!=undefined)?Category.selectedItem.label:''}"
> width="200" />
>                 <cfformgroup type="horizontal">
>                     <cfinput type="button" name="addBtn2" width="60"
> value="Add" onclick="submitAdd_list2()" disabled="{(
> Category.value!=undefined)}" />
>                     <cfinput type="button" name="updateBtn2" width="60"
> value="Update" onclick="submitUpdate_list2()" disabled="{(
> Category.value==undefined)}" />
>                     <cfinput type="button" name="removeBtn2" width="60"
> value="Remove" onclick="submitRemove_list2()" disabled="{(
> Category.value==undefined)}" />
>                 </cfformgroup>
>             </cfformgroup>
>
> Here is the code in the remoting function:
>
>          var responseHandler:Object  = {};
>          var Category:mx.controls.List = Category;
>
>             <!--- handle create response for Category --->
>             responseHandler.createCategory_Result = function( results:
> Object ):Void {
>                     if (results.status){
>                         Category.addItemAt(0,results.item.AMES_Staff,
> results.item);
>                         _root.setMode('add');
>                     }
>                 mx.managers.CursorManager.removeBusyCursor();
>                 alert(results.message);
>             }
>
>             <!--- handle remove response for Category --->
>             responseHandler.removeCategory_Result = function( results:
> Object ):Void {
>                 if (results.status){
>                     Category.removeItemAt(findComboItem(Category,
> results.item.CategoryID));
>                     _root.setMode('add');
>                 }
>                 mx.managers.CursorManager.removeBusyCursor();
>                 alert(results.message);
>             }
>
>     <!--- helper function to find an item in a combobox--->
>     public function findComboItem(select: mx.controls.List,
> optionToSelect:String):Number{
>
>         //go through every item to find the right one
>         for (var i:Number = 0; i< select.length; i++) {
>             if (select.getItemAt([i]).data == optionToSelect){
>                 return i;
>             }
>         }
>             <!--- not found --->
>             return -1;
>     }
>
> Thanks.
> George
>
> On 19/04/07, Kevin Aebig <[EMAIL PROTECTED]> wrote:
> >
> > I'm not sure how familiar you are with Flash and perhaps if you could
> > respond back with some code it would make this more easy to help...
> >
> > Anyhow, to add items to a combobox, just bind to the dataProvider
> instead
> > of
> > adding each manually and when you want to remove items, you need to
> > reference them by their index in the dataprovider (which is a 0 based
> > array).
> >
> > !k
> >
> > -----Original Message-----
> > From: George Lu [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, April 17, 2007 6:22 PM
> > To: CF-Talk
> > Subject: Flash Forms: ComboBox help
> >
> > Hi,
> >
> > I'm using Flash Remoting in adding/removing an item in a combo box (drop
> > down list). I can add the item to the list after remote call
> (addItemAt())
> > but I can't do the same thing for removing the item from the list using
> > removeItemAt().
> >
> > Please help!
> >
> > George
> >
> >
> >
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:276083
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to