5 Replies Latest reply on Dec 1, 2009 7:27 PM by jeeepU

    Checkbox, selected true or false

    jeeepU Level 1

      Hey All,

           I need to tell wheter or not my checkbox is selected and have this placed in xml. When the check box is checked how do I get the xml to return "True"? Thanks

       

      This is what I have so far that returns a "True" but not in the xml

       

      <mx:CheckBox x="127" y="485" id="checkBox" label="Checkbox" selected="false" click="isChecked()" enabled="true"/>

       

      private function isChecked():void {
                      if (checkBox.selected) {
                         Alert.show(trueTax());
                      } else {
                          Alert.show(falseTax());
                      }
               }

       

      private function trueTax():String {
                      return "True";
                  }
                 
                  private function falseTax():String {
                      return "False";
                  }

       

      <mx:HTTPService id="userRequest" url="http://www.test.com/test.php" useProxy="false" method="POST">
              <mx:request xmlns="">
                 
                  <checkBox>isChecked();</checkBox>
                 
              </mx:request>
          </mx:HTTPService>