From 88320335f21f3fd8aee3ccc036f66db726a523ec Mon Sep 17 00:00:00 2001 From: Yuval Adam Date: Sun, 10 Mar 2013 18:07:43 +0200 Subject: Use proper JSON for Order objects --- index.html | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'index.html') diff --git a/index.html b/index.html index ba53bb6..a72baf1 100644 --- a/index.html +++ b/index.html @@ -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; }); }); -- cgit v1.3.1