Page 1 of 1

OnChange Event Error when control not rendered

PostPosted: 14 Jul 2017 19:02
by mrcarver
CG Gurus

I have discovered a bug, which I am hoping you can fix. I use the CGDropDown consistently on the CGDialogEx controls. The problem I am experiencing is if the CGDropDown has the OnChange event assigned, and the CGDropDown has not been rendered, then a JavasScript effort surfaces even though the OnChange event has not fired.

So please take steps to prevent the JS code OnChange event from firing when the Control has not been changes. In my case, the controls have not even been filled yet.

My Current work around is to set the page to RenderInvisibleControls := True. This is vary busy page, and obviously would rather not render all controls

Regards,
Monte Carver

Here is an example of the JS Error:
IWPreScript__ED0FC07D4.js:67 Error in processAjaxExecute when evaluating: $("#CBXREFTYPE_JQ").select2("val","");$("input[name=CBXREFTYPE_JQ_INDEX]").val("");
AddChangedControl("CBXREFTYPE_JQ_INDEX");$("#CBXREFTYPE_JQ").select2("enable",false);$("#CBXREFTYPE_JQ").select2("val","");$("input[name=CBXREFTYPE_JQ_INDEX]").val("");
AddChangedControl("CBXREFTYPE_JQ_INDEX");$("#CBXREFTYPE_JQ").select2("val","");$("input[name=CBXREFTYPE_JQ_INDEX]").val("");

Re: OnChange Event Error when control not rendered

PostPosted: 18 Jul 2017 09:33
by Alexander Bulei
Hi mrcarver,

Can you send us the simple testcase project please?

Best Regards.