Tagged: 

This topic contains 5 replies, has 4 voices, and was last updated by  admin 1 week, 6 days ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • jqxInput change event #31062

    Peter Sloth
    Participant

    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>
    jqxInput change event #31081

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxInput change event #31090

    Peter Sloth
    Participant

    Hi 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 Sloth

    jqxInput change event #31091

    Peter Stoev
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    jqxInput change event #120774

    Shorya Garg
    Participant

    Hi,

    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 Garg

    • This reply was modified 1 week, 6 days ago by  Shorya Garg.
    jqxInput change event #120779

    admin
    Keymaster

    Hi 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 Stoev

    jQWidgets Team
    https://www.jqwidgets.com/

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.