Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
200
Exception while accessing igCombo value in javaScript
posted

Hi

    I have a drop down combo like below:

    var categories = [ {"value": "0", "name" : "Eric"},

         {"value": "1", "name" : "Juan"},
         {"value": "2", "name" : "Sha"},
         {"value": "3", "name" : "Hash"}
         ];

         $("#catid").igCombo({
         textKey: "name",
         valueKey: "value",
         dataSource: categories,
         mode: "dropdown",
         width: 195,
         nullText : "Please Select Category",
         autoComplete: true,
         dropDownOnFocus: true,
         required: getRequired(),
         validatorOptions: {
                  required: true,
                  errorMessage: "Please Select Category",
                  formSubmit: true,
                  onsubmit: true,
                  onchange: false,
                  onblur: true
         }
});

But on form submit, when selecting the value like below, i am getting below exception:

var catID =  $("#catid").igCombo("value");

Exception:    cannot call methods on igCombo prior to initialization; attempted to call method 'value'

Could you please do the needful help ?

Thank you...