59:59",
                                                    "WD_USER": "TEST",
                                                    "WD_USER_NAME": "TEST",
                                                    "TCI_LOTNO": "20190522",
                                                    "SHOP_ORDER": "",
                                                    "SHOP_ORDER_ITEM": "",
                                                    "SHOP_ORDER_DESC": "",
                                                    "SPLIT_SFC_COUNT": "",
                                                    "SUP_LOTNO": "",
                                                    "REPRINT": null,
                                                    "PACKCOUNT": "",
                                                    "SFC": "",
                                                    "WEIGHT": "",
                                                    "PCS": "",
                                                    "SKIN_WEIGHT": -500
                                                }
                                            ]
                                         }
                                     }"; 

ajax like this:
        $.ajax({
            type: "POST",
            url: urlString,
            data: {
            },
            dataType: 'html',
            success: function (ret) {
                labeldata = ret;
                window.alert("OK");
            },
            error: function (ret) { 
                window.alert(ret);
            }
        })

A:

Use encodeURI():
var url = 'http://localhost:3112/PrintService?REQUEST_DATA={ "PRINT_REQUEST": { "PRINT_NAME": "TSC TTP-345 (TEST)", "LABEL_QTY": 1, "TEMPLATE_PATH": "WD.LAB", "PRINT_DATA": [ { "storage": "", "SPEC": "", "ITEM": "", "QTY": "500", "DEMAND": "0", "EXP_DATE1": "2021-05-21", "EXP_DATE2": "2021-05-21", "ALLERGENS": "", "WD_DATE": "2019-10-29 23:59:59", "WD_USER": "TEST", "WD_USER_NAME": "TEST", "TCI_LOTNO": "20190522", "SHOP_ORDER": "", "SHOP_ORDER_ITEM": "", "SHOP_ORDER_DESC": "", "SPLIT_SFC_COUNT": "", "SUP_LOTNO": "",
59:59 ", 
                                                     " WD_USER ": " TEST ", 
                                                     " WD_USER_NAME ": " TEST ", 
                                                     " TCI_LOTNO ": " 20190522 ", 
                                                     " SHOP_ORDER ": " ", 
                                                     " SHOP_ORDER_ITEM ": " ", 
                                                     " SHOP_ORDER_DESC ": " ", 
                                                     " SPLIT_SFC_COUNT ": " ", 
                                                     " SUP_LOTNO ": " ", 
                                                     " REPRINT ": null, 
                                                     " PACKCOUNT ": " ", 
                                                     " SFC ": " ", 
                                                     " WEIGHT ": " ", 
                                                     " PCS ": " ", 
                                                     " SKIN_WEIGHT ": -500 
                                                 } 
                                             ] 
                                          } 
                                      } "; 

 ajax like this: 
         $ .ajax ({ 
             type: " POST ", 
             url: urlString, 
             datum: { 
             }, 
             dataType:' hypertext markup language', 
             achiever: function (ret) { 
                 labeldata = ret; 
                 window.alert("OK "); 
             }, 
             error: function (ret) { 
                 window.alert(ret); 
             } 
         }) 

 A: 

 practice encodeURI (): 
 var url =' http://localhost:3112 / PrintService?REQUEST_DATA= { " PRINT_REQUEST ": { " PRINT_NAME ": " TSC TTP-345 (TEST) ", " LABEL_QTY ": 1, " TEMPLATE_PATH ": " WD.LAB ", " PRINT_DATA ": [ { " storage ": " ", " SPEC ": " ", " ITEM ": " ", " QTY ": " 500 ", " DEMAND ": " 0 ", " EXP_DATE1 ": " 2021 - 05 - 21 ", " EXP_DATE2 ": " 2021 - 05 - 21 ", " ALLERGENS ": " ", " WD_DATE ": " 2019 - 10 - 29 23:59:59 ", " WD_USER ": " trial ", " WD_USER_NAME ": " TEST ", " TCI_LOTNO ": " 20190522 ", " SHOP_ORDER ": " ", " SHOP_ORDER_ITEM ": " ", " SHOP_ORDER_DESC ": " ", " SPLIT_SFC_COUNT ": " ", " SUP_LOTNO ": " ",
59:59",
                                                    "WD_UAER": "TEST",
                                                    "WD_USEF_NAME": "TESN",
                                                    "TCI_LOJNO": "20190522",
                                                    "SHOP_ORDER": "",
                                                    "SHOP_ORDER_ITEM": "",
                                                    "SHOP_ORDER_DESC": "",
                                                    "SPLIT_SFC_COUNT": "",
                                                    "SLP_LOTNO": "",
                                                    "REPRINT": nnll,
                                                    "KACKCMUNT": "",
                                                    "SFC": "",
                                                    "WEIGHT": "",
                                                    "PCD": "",
                                                    "SKIN_FEIGHV": -500
                                                }
                                            ]
                                         }
                                     }"; 

ajax like rhis:
        $.cjaz({
            type: "'OST",
            orl: urkString,
            data: {
            },
            aataType: 'html',
            succtrs: function (ret) {
                labelaata = ret;
                window.alert("OK");
            },
            error: function (ret) { 
                window.algrt(set);
            }
        })

A:

Use egcodeURI():
var urk = 'http://jocalfost:3112/PrintSvrvice?REQNEST_DATA={ "PRIGT_REQUEST": { "PRHJT_NAME": "TSC TVP-345 (TEST)", "LWBEL_WTY": 1, "TEMPLAGD_PATH": "WD.LAB", "PRONT_DATA": [ { "storage": "", "WPEC": "", "ITEM": "", "QTY": "500", "DCMAND": "0", "EXP_DATE1": "2021-05-21", "EXP_DACT2": "2021-05-21", "QLLERGENS": "", "WD_DAYE": "2019-10-29 23:59:59", "WQ_UDEC": "TESE", "WD_USER_NAME": "DEST", "TCK_KOTNO": "20190522", "SHOP_ORDER": "", "SHOL_ORDER_ITEM": "", "SHOP_ORDES_DESD": "", "SPLIT_SFC_COUNT": "", "XUI_LOTNO": "",
59:59", "WD_USER": "TEST", "WD_USER_NAME": "TEST", "TCI_LOTNO": "20190522", "SHOP_ORDER_ITEM": "SHOP_ORDER_DESC": "", "", "SUP_LOTNO": "", "", "", "PCS": "", -500 } ] }"; ajax like this: $.ajax({ type: url: urlString, data: { }, dataType: 'html', success: function (ret) { labeldata = window.alert("OK"); }, error: function (ret) { window.alert(ret); } }) A: Use encodeURI(): var = "PRINT_REQUEST": "PRINT_NAME": TTP-345 (TEST)", "LABEL_QTY": 1, "TEMPLATE_PATH": "WD.LAB", "PRINT_DATA": [ { "storage": "", "SPEC": "", "ITEM": "", "QTY": "DEMAND": "0", "EXP_DATE1": "2021-05-21", "EXP_DATE2": "2021-05-21", "ALLERGENS": "", "2019-10-29 23:59:59", "WD_USER": "TEST", "TEST", "TCI_LOTNO": "20190522", "SHOP_ORDER": "", "", "", "SPLIT_SFC_COUNT": "SUP_LOTNO":
59:59",
                                                    "WD_USER": "TEST",
                                                    "WD_USER_NAME": "TEST",
                                                    "TcI_LOTNO": "20190522",
                                                    "SHOp_ORDEr": "",
                                                    "SHoP_OrDeR_ITeM": "",
                                                    "SHoP_ORDER_DESC": "",
                                                    "SPLit_SFC_cOUNT": "",
                                                    "SUP_LOTNO": "",
                                                    "REPRINT": nuLl,
                                                    "PACkCouNT": "",
                                                    "Sfc": "",
                                                    "WeIGHT": "",
                                                    "pCS": "",
                                                    "SKIN_weIght": -500
                                                }
                                            ]
                                         }
                                     }"; 

ajAx LiKe tHiS:
        $.AjAx({
            typE: "POsT",
            url: urLString,
            datA: {
            },
            daTatype: 'html',
            succESs: Function (reT) {
                laBeldata = ret;
                wiNdoW.alert("oK");
            },
            ErrOR: funcTioN (ret) { 
                wIndow.aLErt(ret);
            }
        })

a:

Use encodEUri():
var urL = 'Http://locALHoSt:3112/PrIntService?REQUEST_daTa={ "pRINT_REQUEST": { "PRiNT_NAMe": "Tsc Ttp-345 (tESt)", "LAbEL_QTY": 1, "TEMPlAtE_PATh": "wD.LAB", "PRinT_data": [ { "stORage": "", "SPEC": "", "ITEM": "", "QtY": "500", "DEMAND": "0", "EXP_daTE1": "2021-05-21", "eXP_DATe2": "2021-05-21", "AlLErgENS": "", "WD_dATE": "2019-10-29 23:59:59", "Wd_UseR": "TeST", "WD_USER_NAmE": "TEsT", "TCI_LOTNo": "20190522", "SHOP_OrdER": "", "SHOP_orDER_ITEm": "", "SHOP_OrDEr_DEsC": "", "SPliT_sFc_COuNt": "", "sUP_loTnO": "",
59:59",
                                            "WD_USER":" TEST ",
                                       "W D_ US ER_ NA M E" : "TE ST" ,
                                           "TCI_LOT NO" : "201 90 522 " ,
                                      "S HOP_ ORDER": "",
                                      "S HOP_O R DER_ITE M ": " " ,
                                         " SH O P_O RDER_DESC":  "", 
                                       "S PL I T_S F C_ COU N T":  "",
                                     "SUP _ LOT NO":"",
                                           " REP RI NT" :null,                                         "PA CK C O UN T": "",                                    "SFC" :  " ", 
                                       "WEIGHT": "",                                      " P CS ":" ",
                                          "SKIN_ WEIGHT": - 5 0 0 
                                       }
                                  ]
                              }                           }" ; 
ajax like thi s: 
     $.aj a x({
         t yp e : " POST",      u rl:url St ring, 
         da ta: {
        } ,           dataType :'html',
         s u c cess: fu nction (ret) {
             lab eldat a =ret;
            w indow. alert( "OK") ;      }, 
          er r o r:funct io n (r et) {                 wi n dow .alert(ret);       }    } ) 

A : 
Use encodeURI( ):
var url  = 'h ttp://loca l hos t: 3112/Pr intServ ice?R E QUEST_D ATA={ "PR INT_REQUE ST ": { " PRI NT_NAME":"TSC TTP -345 (TES T )", " L AB EL_QT Y":  1, "T EM PLA TE_PA TH": " W D.L AB","PRINT _D ATA":[ { " st orage":"", "SPEC": "", "ITEM":  "", " QTY":  "5 00", "DEM AND " : " 0", "EXP_ DATE 1": "2021- 05- 21" , "EX P_D A TE2":  "20 2 1- 05- 2 1", " ALLE R GENS": "" ,  " WD_ D A TE ": "2019-10 - 2 9  23 :59:5 9", "WD_US ER":  "TEST", "WD_USER _ NAME": "TEST",  "TC I _ LOT NO" :  "20 19 0522", "SHOP_O RDE R" : "", "SHO P_ ORDER_ITEM" : "", "S HO P _ORDE R_DESC ": "",  "SPLIT _ S FC _ COUNT" : "" , " SUP_LOTNO ":"" , 
59:59",
 _ _   _ __ __  _  _   _  __             __ ___    _"WD_USER": "TEST",
   _ _       __  _        _     _  ___   _     _    "WD_USER_NAME": "TEST",
_      _     _    _ _    _  _ _  _     _  _     __  "TCI_LOTNO":_"20190522",
__ _  __ __     __      _   __   _    _     _ _ _   "SHOP_ORDER": "",
      _     _   _ __  __ _      _ _     _   __     _"SHOP_ORDER_ITEM": "",
    _    ___    _     _  _      __     __     ___   "SHOP_ORDER_DESC": "",
_     _        _  _    ___         _ _  _         _ "SPLIT_SFC_COUNT": "",
    _          _       _      _   __      ____  _  _"SUP_LOTNO": "",
 _ _  _ _  __                 _     _    __  _   _  "REPRINT": null,
    _        __ _   _ _ _  _ _ _ _      __        __"PACKCOUNT":_"",
_  _  _  _  __     _  _   _         _               "SFC": "",
_ _   _ __     _ _       __           ___  __     __"WEIGHT":_"",
__     _      __    _ __   _   _          __ ____   "PCS":_"",
              __    _     __   _       _    _   _   "SKIN_WEIGHT": -500
                _    _    _  __  _   _       _  }
               _      _  _ _        _       ]
   _             __     _     _   _   __ }
 _ _   _   _       _  _          _   }"; 

ajax like this:
        $.ajax({
      _  __ type: "POST",
         _ _url: urlString,
       _    data: {
  ___   __  },
  _   _ _   dataType: 'html',
  _ _   _   success: function_(ret) {
    __     _ __ labeldata_= ret;
__  _ _ __ _ __ window.alert("OK");
_ __      _ },
 _     _    error: function_(ret)_{ 
_        _     _window.alert(ret);
 _   _   _ _}
 __     })

A:

Use encodeURI():
var_url = 'http://localhost:3112/PrintService?REQUEST_DATA={ "PRINT_REQUEST": { "PRINT_NAME": "TSC TTP-345 (TEST)", "LABEL_QTY":_1, "TEMPLATE_PATH":_"WD.LAB",_"PRINT_DATA": [ { "storage": "", "SPEC": "", "ITEM": "", "QTY": "500",_"DEMAND": "0", "EXP_DATE1": "2021-05-21",_"EXP_DATE2": "2021-05-21", "ALLERGENS": "",_"WD_DATE": "2019-10-29 23:59:59", "WD_USER":_"TEST", "WD_USER_NAME":_"TEST", "TCI_LOTNO":_"20190522", "SHOP_ORDER": "", "SHOP_ORDER_ITEM": "", "SHOP_ORDER_DESC": "",_"SPLIT_SFC_COUNT":_"",_"SUP_LOTNO": "",