mirror of
https://github.com/esx-framework/esx_core.git
synced 2026-09-01 02:38:53 +00:00
Pressing enter inside input now posts, further improvements
This commit is contained in:
@@ -34,10 +34,29 @@ $(window).ready(function () {
|
||||
$('#deposit_amount').val(0);
|
||||
})
|
||||
|
||||
$('#deposit_amount').on("keyup", function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$.post('http://esx_atm/deposit', JSON.stringify({
|
||||
amount: $('#deposit_amount').val()
|
||||
}));
|
||||
$('#deposit_amount').val(0);
|
||||
}
|
||||
});
|
||||
|
||||
$('#withdraw_btn').on('click', function () {
|
||||
$.post('http://esx_atm/withdraw', JSON.stringify({
|
||||
amount: $('#withdraw_amount').val()
|
||||
}));
|
||||
$('#withdraw_amount').val(0);
|
||||
});
|
||||
|
||||
$('#withdraw_amount').on("keyup", function(e) {
|
||||
if (e.keyCode == 13) {
|
||||
$.post('http://esx_atm/withdraw', JSON.stringify({
|
||||
amount: $('#withdraw_amount').val()
|
||||
}));
|
||||
$('#withdraw_amount').val(0);
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
+2
-2
@@ -14,12 +14,12 @@
|
||||
</div>
|
||||
<div id="menu">
|
||||
<div>
|
||||
<input type="number" id="deposit_amount"/>
|
||||
<input type="number" id="deposit_amount" tabindex="1" onClick="this.select();"/>
|
||||
<button id="deposit_btn">Déposer</button>
|
||||
</div>
|
||||
<br><br>
|
||||
<div>
|
||||
<input type="number" id="withdraw_amount"/>
|
||||
<input type="number" id="withdraw_amount" tabindex="2" onClick="this.select();"/>
|
||||
<button id="withdraw_btn">Retirer</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -14,12 +14,12 @@
|
||||
</div>
|
||||
<div id="menu">
|
||||
<div>
|
||||
<input type="number" id="deposit_amount"/>
|
||||
<input type="number" id="deposit_amount" tabindex="1" onClick="this.select();"/>
|
||||
<button id="deposit_btn">Einzahlen</button>
|
||||
</div>
|
||||
<br><br>
|
||||
<div>
|
||||
<input type="number" id="withdraw_amount"/>
|
||||
<input type="number" id="withdraw_amount" tabindex="2" onClick="this.select();"/>
|
||||
<button id="withdraw_btn">Abheben</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+2
-2
@@ -14,12 +14,12 @@
|
||||
</div>
|
||||
<div id="menu">
|
||||
<div>
|
||||
<input type="number" id="deposit_amount"/>
|
||||
<input type="number" id="deposit_amount" tabindex="1" onClick="this.select();"/>
|
||||
<button id="deposit_btn">Deposit</button>
|
||||
</div>
|
||||
<br><br>
|
||||
<div>
|
||||
<input type="number" id="withdraw_amount"/>
|
||||
<input type="number" id="withdraw_amount" tabindex="2" onClick="this.select();"/>
|
||||
<button id="withdraw_btn">Withdraw</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user