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...


Parents
No Data
Reply
  • 16310
    Suggested Answer
    Offline posted

    Hello,

    I reviewed your code and it seems ok, however I need to see how you handle the form submit event in order to investigate this. I will appreciate if you could send me this part of your code.

    Meanwhile please review the attached sample for a demonstration of handling the form submit event. I hope it helps.

    Please let me know if you have any additional questions regarding this issue.

    igcombo_sample.zip
Children