Hi, your code didn't come through with you initial post.
Regretfully I don't have an idea what's going wrong here: Removing an option via Javascript shouldn't trigger any change event handler.
Sven On 02/13/2013 08:56 PM, divad91 wrote:
The code is in my first post at the end. With jQuery 1.6.1 enhanceComboBoxes : function enhanceComboBoxes() { var comboboxes = $("select:not(.emptyOptionEnhanced, .noRemoveEmptyChoice)"); comboboxes.each(function() { var combo = $(this); var emptyOptions = combo.find("option[value='']"); if (emptyOptions.length) { combo.debug("Enhancing combo box with empty option"); combo.change(function(e) { emptyOptions.debug("Removing empty option").remove(); }); ).addClass("emptyOptionEnhanced"); }, The enhanceComboBoxes function is called after each ajax call. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/AjaxEventBehavior-called-twice-because-of-javascript-onchange-tp4656329p4656334.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org