EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: devnull on March 13, 2013, 05:41:45 AM



Title: form onchange not firing
Post by: devnull on March 13, 2013, 05:41:45 AM
can't get the form onchange event to fire with any of the easyui-boxes:

http://jsfiddle.net/uAqKG/1

only the normal <input type="text"> appears to fire the onchange event.





Title: Re: form onchange not firing
Post by: devnull on March 14, 2013, 04:09:36 PM
Bump...

Any solution for this ???


Title: Re: form onchange not firing
Post by: stworthy on March 14, 2013, 05:57:32 PM
Here is the solution to solve this problem.
Code:
(function($){
var datebox = $.fn.datebox.defaults.onChange;
$.fn.datebox.defaults.onChange = function(newValue, oldValue){
$(this).closest('form').trigger('change');
datebox.call(this, newValue, oldValue);
};
var combobox = $.fn.combobox.defaults.onChange;
$.fn.combobox.defaults.onChange = function(newValue, oldValue){
$(this).closest('form').trigger('change');
combobox.call(this, newValue, oldValue);
};
})(jQuery);

Please refer to the updated sample http://jsfiddle.net/uAqKG/4/.