This appendix provides reference information for all HTML variables for developing a customized data entry process to send Tracking Pre-Alert to KLS for your company web site. All variables are uploaded using POST method
Input Parameters
Output Parameters
Javascript Code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>XML FETCH() EXAMPLE</title> <script> function xmlpostdatafetch() { let formData = new FormData(); formData.append('_strAccountNumber','YOUR_ACCOUNT'); formData.append('_strAccountPassword','YOUR_PASS'); formData.append('_strTrackingNumber','TRACKINGNUMBER'); formData.append('_strConsigneeID','CONSIGNEEID'); formData.append('_strConsigneeName','CONSIGNEENAME'); formData.append('_strWeight','1.25'); formData.append('_strWeightUnit','KG'); formData.append('_strValue','65.99'); fetch('http://YOUR_FREIGHT_HANDLER_SERVER_NAME/CFQPreAlertHandler.ashx', { method: 'POST', mode: 'cors', referrerPolicy: 'no-referrer', body: new URLSearchParams(formData) }) .then(response => { response.text(); }) .then(data => { document.getElementById('xmlresponse').innerHTML = data.replace(/</gi,'<').replace(/>/gi,'>\n'); }) .catch((err) => { document.getElementById('xmlresponse').innerHTML = 'Error fetching XML data'; }); document.getElementById('xmlresponse').innerHTML = 'Waiting for XML data...'; } </script> </head> <body> <input type="button" onclick="xmlpostdatafetch();" value="Post Data"> <br /> <br /> <div id="xmlresponse">Ready to fetch data</div> </body> </html>
<?xml version="1.0" standalone="yes"?> <NewDataSet> <Errors> <Error_Number>0</Error_Number> <Error_MSG>Pre-Alert for Tracking: TRACKINGNUMBER updated successfully</Error_MSG> </Errors> </NewDataSet>