jQuery UI Widgets › Forums › Editors › Input, Password Input, TextArea, ColorPicker, Rating, TagCloud, Loader › jqxInput change event
Tagged: Input
This topic contains 5 replies, has 4 voices, and was last updated by admin 3 years, 2 months ago.
-
AuthorjqxInput change event Posts
-
Hi
it seems that the change event does not fire in IE10. It works in Firefox and Chrome though.
If I type in something in the text box in the sample code below and press Enter nothing happens in IE.
Any ideas?thanks
//Peter
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head> <title id='Description'>The sample illustrates the basic functionality of the jqxInput widget. The jqxInput widget provides suggestions while you type into the field. The datasource is a simple JavaScript array, provided to the widget using the "source" property. </title> <script type="text/javascript" src="../../scripts/gettheme.js"></script> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxinput.js"></script></head><body class='default'> <div id='content'> <script type="text/javascript"> $(document).ready(function () { var theme = ""; $("#input2").jqxInput({ height: 25, width: 200, minLength: 1, theme: theme }); // bind to 'change' event. $('#input2').on('change', function (event) { alert('Hello'); }); }); </script> <input type="text" id="input2"/> </div></body></html>
Hi Peter Sloth,
The “change” event works on Blur(i.e on lost focus), not on key down. In addition, that is HTML Input event and is not created(raised) by us – http://www.w3schools.com/jsref/event_onchange.asp.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter Stoev
the problem is that the change event is not fired on lost focus in IE10. Shouldn’t the example above work in all browsers?
If not, which event will then work?
Thanks
Bests
Peter SlothHi Peter Sloth,
It is raised in IE10. Type something and then focus another HTML Element. The “change” event is raised by the native HTML Input tag. And also “change” is not raised when you press “Enter”. That is custom logic and not a default behavior, because you can press “Enter” even when you did not change anything.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi,
Is there a way to trigger change event on value change and not after pressing the Enter?
change event() : input change while typing
Thanks,
Shorya GargHi Shorya Garg,
While typing, input and keyup events are available. “change” in Javascript and native HTML inputs is raised on blur or when enter is pressed.
Best regards,
Peter StoevjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.