jQuery UI Widgets › Forums › Editors › NumberInput › numberinput
Tagged: jqxnumberinput, numberinput, setDecimal, val
This topic contains 1 reply, has 2 voices, and was last updated by Nadezhda 9 years, 6 months ago.
-
Authornumberinput Posts
-
hello
I can not set into value to numberinputI try this
$(‘#InvoiceActionAmount’).jqxNumberInput(‘setDecimal’, 555);
$(‘#InvoiceActionAmount’)val(555);
$(‘#InvoiceActionAmount’).jqxNumberInput(‘val’, 561.23);I this error
undefined or
$(‘#InvoiceActionAmount’).jqxNumberInput(‘setDecimal’, 555); Unable to get property ‘0’ of undefined or null reference<script type="text/javascript" src="/Assets/jqwidgets/scripts/jqxcore.js"></script> <script type="text/javascript" src="/Assets/jqwidgets/scripts/jqxexpander.js"></script> <script type="text/javascript" src="/Assets/jqwidgets/scripts/jqxsplitter.js"></script> <script type="text/javascript" src="/Assets/jqwidgets/scripts/jqxdata.js"></script> <script type="text/javascript" src="/Assets/jqwidgets/scripts/jqxbuttons.js"></script> <script type="text/javascript" src="/Assets/jqwidgets/scripts/jqxnumberinput.js"></script>
Hello mustafa,
Please, find the following example which shows how to set value in jqxNumberInput.
<!DOCTYPE html> <html lang="en"> <head> <title></title> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxnumberinput.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxbuttons.js"></script> <script type="text/javascript"> $(document).ready(function () { // Create jqxNumberInput $("#jqxNumberInput").jqxNumberInput({ width: '250px', height: '25px', spinButtons: true, decimal: 200 }); $("#jqxNumberInput2").jqxNumberInput({ width: '250px', height: '25px', spinButtons: true, decimal: 200 }); $("#jqxNumberInput3").jqxNumberInput({ width: '250px', height: '25px', spinButtons: true, decimal: 200 }); $("#jqxButton").jqxButton({ height: '30px', width: '120px' }); $('#jqxButton').on('click', function () { $('#jqxNumberInput').jqxNumberInput('setDecimal', 555); $('#jqxNumberInput2').jqxNumberInput('val', 561.23); $('#jqxNumberInput3').val(1242); }); }); </script> </head> <body class='default'> <div id='jqxNumberInput'> </div> <div id='jqxNumberInput2'> </div> <div id='jqxNumberInput3'> </div> <div> <input style="margin-top: 20px;" type="button" id='jqxButton' value="Set the decimal" /> </div> </body> </html>
Best Regards,
NadezhdajQWidgets team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.