1 Reply Latest reply on Sep 3, 2006 3:09 AM by CoolCountDracula

    Pass checkbox value to database?

    Dr._Goomba Level 1
      I have a checkbox group of Genres that is retreived from a database. Each Genre has a corresponding GenreID. When the user checks related Genres, i need the value (GenreID) to be passed to the database. Considering the checkbox object doesnt have a value property, how can i pass the value? Thanks!

      <mx:RemoteObject
      id="roGenres"
      destination="ColdFusion"
      showBusyCursor="true" source="movies.mGenresGateway"
      fault="Alert.show(event.fault.faultString, 'Error');">
      <mx:method name="getAll" result="genresReceived(event)" />
      </mx:RemoteObject>

      [Bindable]
      public var genres:ArrayCollection = null;

      private function genresReceived(event:ResultEvent):void {
      genres = new ArrayCollection();
      genres.source = event.result as Array;
      }

      <mx:Repeater id="dp" dataProvider="{genres}">
      <mx:CheckBox label="{dp.currentItem.genre}"/>
      </mx:Repeater>