I have this situation: jqxNumberInput object plus a jqxInput object
I want to update jqxInput object value on NumberInput textchanged event. That works fine.
But I also want to do something on jqxInput change event. And that is not working:
If you take a look at my code below, what I’m not getting is the “Hey.. I’ve changed!” message as I spin the jqxNumberInput object.
You might think why not doing it all on “textchanged” event. The answer is because the script logic is so much complex. ( #result is updated from various other objects as well)
my code:
<script type=”text/javascript”>
$(document).ready(function () {
$(“#result”).jqxInput( {width: ’90px’, height: 28, searchMode: ‘none’ } ).prop(“readonly”, false).on(‘change’, function() {
alert(“hey… I’ve changed!”);
});
$(“#jqxNumberInput”).jqxNumberInput({
min: 0,
width: ’90px’, height: 28,
spinButtons: true,
textAlign: ‘right’,
decimalDigits: 2,
inputMode: ‘simple’
}).on(‘textchanged’, function(){
$(“#result”).val( $(this).val() );
});
});
</script>
</head>
<body>
<div id=”jqxNumberInput”></div>
<br/><br/>
<input type=”text” id=”result” />
</body>
`