I have this snippet of code:
var ShopLogicOptions = {};
ShopLogicOptions.params = {orderId: "'" + JS_OrderNo + "'", cartItems:[JS_arrCartItems], subTotal: "'" + JS_SubTotal + "'",...
How do I correctly put variable JS_OrderNo in the position it is at?
The other server is receiving this: "'9134832'",
And it should be this: '9134832',
EDIT: When I document.write JS_OrderNO it looks like this 9134832, so I have to add the single quotes.
document.write('abc'), you don't see quotes there either. The quotes are only needed when making string literals."'" + JS_OrderNo + "'". This literally makes the string'9134832'(the quotes are part of the string). You don't need to add quotes.""+ variableorString(variable)