0 Replies Latest reply on Apr 7, 2011 10:50 PM by sudheerCh

    Validation of fields

    sudheerCh

      I have four mandatury fields in a page and one submit button.Among that one was read only field and another one  is drop down list.If all four fields are populated then only save button should be enabled,otherwise it should be disabled.

       

      Can any one help me this?

       

      Here is my code...

       

      private

       

      if (customercode.text=="" ){

      Csave.enabled=

      false;

       

      return;}if(customername.text==""){

       

       

      Csave.enabled=

      false;

       

       

      return;}

      function validation():void{

       

      if(geo.text==""){

      Csave.enabled=

      false;

       

      return;}

       

       

      if(cmblistunit.selectedIndex==-1){

      Csave.enabled=

      false;

      Alert.show(

      "Error:Customer type cannot be null.Please select a valid Customer Type!");

       

      return;

      }

       

      Csave.enabled=

      true;

      }

       

      If geo field(read only) value is selected last,then save button is not enabling.

       

      Message was edited by: sudheerCh