Before incorporating Infragistics fields into my webapp, I was using the HTML onchange event on HTML elements to trigger other page actions - when a number changed in one field then other fields with calculations were affected automatically. I am now wrapping my input fields in Infragistsics editors and the HTML onchange event is disabled.
http://jsfiddle.net/roq7om5d/2/
This shows this behavior. Is this a bug? Why would your controls disable something that's native HTML? I know the IG controls have their own events, but that requires individual javascript calls to set the event up only for certain elements.
Is there any fix or workaround?
Thank you
Hello CJ,
Thank you for the sample attached.
What you are observing is by design. This event is canceled for the igEditors at some point, in order to work and maintain the current functionality. I suggest you to use the existing robust API and editor’s specific event to implement the required logic. For example these could be textChanged / valueChanged OR valueChanging events.
OK, not the answer I was hoping to get, but I'll work with it. It seems to me to be a lot cleaner to use the native HTML "onchange" event right where the field definition is in the HTML, instead of having separate javascript code to handle each one of these. It is also more difficult because if you have multiple types of IG elements ( igCombo, igEditor, igNumericEditor... ) that need to trigger the same function call, you cannot write a single delegate command :
$(document).delegate(".selector", "igtexteditorvaluechanged", function (evt, ui) { valueChanged(););
".selector"
,
"igtexteditorvaluechanged"
function
(evt, ui) { valueChanged(););
to set all these different fields because the 'event' type is different ie igtexteditorvaluechanged, ignumericeditorvaluechanged, etc. To accomplish what I want, I need some messy, unreadable and more complicated code that shouldn't be necessary.
Thank you for replying