diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2013-03-10 18:07:43 +0200 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2013-03-10 18:07:43 +0200 |
| commit | 88320335f21f3fd8aee3ccc036f66db726a523ec (patch) | |
| tree | 306886a2fbe5899a44e95d14c7242581f942f5bd /index.html | |
| parent | fd1efa2a0de306847cd2dd9f8b709e9f46f2ad0d (diff) | |
Use proper JSON for Order objects
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -24,13 +24,16 @@ } $('#order-submit').click(function() { - console.log('presub'); var type = $('input:radio[name=type]:checked').val(); var price = $('#order-price').val(); var amount = $('#order-amount').val(); - var order = client_id + '|' + type + '|' + price + '|' + amount - ws.send(order); - console.log('postsub'); + var order = { + type: type, + amount: amount, + price: price, + client: client_id + }; + ws.send(JSON.stringify(order)); return false; }); }); |
