Title: combo onChange & OnSelect events when form loads [Solved] Post by: devnull on February 27, 2015, 04:49:29 AM http://jsfiddle.net/hFsxP/87/
Please see the fiddle, if you manually select the combobox, then the onChange and onSelect events fire. But if when the form is loaded and the combo value is changed & selected, the events do not fire. How can I get the event to fire whenever the combobox changes, either by the user of when the form is loaded programmatically ? Other than the form events, is there another event on the combobox that I can hook into when the value changes ? Title: Re: combo onChange & OnSelect events when form loads Post by: stworthy on February 27, 2015, 11:21:01 PM Please download the patch from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4.1-patch.zip
Title: Re: combo onChange & OnSelect events when form loads Post by: Opan Mustopah on February 28, 2015, 08:02:34 AM there is patch too for version 1.4.0 about this issue stworthy???
Title: Re: combo onChange & OnSelect events when form loads Post by: stworthy on February 28, 2015, 09:45:45 AM The patch for 1.4 is available from http://www.jeasyui.com/download/downloads/jquery-easyui-1.4-patch.zip
Title: Re: combo onChange & OnSelect events when form loads Post by: Opan Mustopah on February 28, 2015, 09:49:23 AM thanks stworthy
Title: Re: combo onChange & OnSelect events when form loads Post by: devnull on February 28, 2015, 04:44:53 PM Sorry for not realizing this earlier, but the original design where the event is NOT triggered is actually desirable in many situations, especially when the combobox is the key record selector for the form, in which case it will cause recursion if triggered during form load.
Would it be possible to make this event trigger switchable with a new property ? Title: Re: combo onChange & OnSelect events when form loads Post by: stworthy on March 01, 2015, 08:32:07 AM it will cause recursion if triggered during form load. Could you please provide an example to show how this issue occur. Title: Re: combo onChange & OnSelect events when form loads Post by: devnull on March 01, 2015, 04:38:46 PM This is what I mean:
http://jsfiddle.net/hFsxP/89/ It is OK using the existing version, but I am not sure if it will cause recursion due to the new patch ? Whereby when the combo is selected, it loads the form, which changes / selects the combo, which loads the form, which changes the combo etc etc etc.. Title: Re: combo onChange & OnSelect events when form loads Post by: stworthy on March 01, 2015, 08:43:12 PM The 'onChange' event fires only when the value is changed. When a combo item is selected, loading the form using the selected combo value does not trigger the 'onChange' event again. It does not lead to an infinite recursion.
Title: Re: combo onChange & OnSelect events when form loads Post by: devnull on March 02, 2015, 04:41:00 PM Great, thanks for clarifying that and for the fix.
|