This appendix provides reference information for all HTML variables for developing a customized Tracking solution for your company web site. All variables are uploaded using POST method
Input Parameters
Output Parameters
Case _strModule = W
Case _strModule = Q
ASPX Form Code
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="TrackingTest.aspx.vb" Inherits="KSSS_TrackingTest" %> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> <script language="javascript" type="text/javascript"> // <![CDATA[ function Quick_onclick() { form1._strModule.value = "Q"; return true } function Warehouse_onclick() { form1._strModule.value = "W"; return true } function OnFormSubmit() { if (form1._strServerUri.value == "") { form1._strServerUri.focus(); return false; } else { form1.action = form1._strServerUri.value; return true } } // ]]> </script> </head> <body> <form id="form1" method="post" onsubmit="return OnFormSubmit();" action=""> <div> <h3>Tracking Test Page</h3> <table style="width: 465px" cellpadding="4"> <tr> <td> <nobr>Uri to Test</nobr> </td> <td style="width: 100%"> <input id="_strServerUri" name="_strServerUri" type="text" value="http://YOUR_FREIGHT_HANDLER_SERVER_NAME/TrackingHandler.ashx" /> </td> </tr> <tr> <td> Tracking </td> <td style="width: 100%"> <input id="_strNumber" name="_strNumber" type="text" value="<%=HttpContext.Current.Request.Form.Item("_strNumber") %>" /> </td> </tr> <tr> <td> <nobr>Your Account</nobr> </td> <td style="width: 100%"> <input id="_strAccountNumber" name="_strAccountNumber" type="text" value="<%=HttpContext.Current.Request.Form.Item("_strAccountNumber") %>" /> </td> </tr> <tr> <td> <nobr>Your Password</nobr> </td> <td style="width: 100%"> <input id="_strAccountPassword" name="_strAccountPassword" type="password" value="" /> </td> </tr> <tr> <td> Reference </td> <td style="width: 100%"> <input id="_strReference" name="_strReference" type="text" value="<%=HttpContext.Current.Request.Form.Item("_strReference") %>" /> </td> </tr> <tr> <td> <nobr>Uri Return</nobr> (The use of this variable is deprecated and its use will be discontinued in later versions) </td> <td style="width: 100%"> <input id="_strUriReturn" name="_strUriReturn" type="test" value="<%=HttpContext.Current.Request.Url.AbsoluteUri %>" /> </td> </tr> <tr> <td colspan=2> <br /> <input id="Quick" type="submit" value="Quick Courier" onclick="return Quick_onclick()" /> <input id="Warehouse" type="submit" value="Warehouse" onclick="return Warehouse_onclick()" /> </td> </tr> </table> <input id="_strModule" name="_strModule" type="hidden" /> </div> </form> <br /> <asp:Label ID="lblResult" runat="server" Text=""></asp:Label> </body> </html>
Partial Class KSSS_TrackingTest Inherits System.Web.UI.Page Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load For Each vInter As String In Request.Form.Keys If vInter.StartsWith("_") = False Then lblResult.Text &= vInter & ": " & Request.Form.Item(vInter) & "<br />" End If Next End Sub End Class
Javascript Code
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>XML FETCH() EXAMPLE</title> <style type="text/css"> .no-wrap { white-space: nowrap; } table td { padding: 4px; } </style> <script type="text/javascript"> function Quick_onclick() { form1._strModule.value = "Q"; return true } function Warehouse_onclick() { form1._strModule.value = "W"; return true } function OnFormSubmit() { return false } function xmlpostdatafetch(value) { try { form1._strModule.value = value; let formData = new FormData(form1); fetch(form1._strServerUri.value, { method: 'POST', mode: 'cors', referrerPolicy: 'no-referrer', body: new URLSearchParams(formData) }) .then(response => { return response.text(); }) .then(data => { document.getElementById('xmlresponse').innerHTML = data.replace(/</gi,'<').replace(/>/gi,'>\n'); }) .catch((err) => { document.getElementById('xmlresponse').innerHTML = 'Error fetching XML data from: ' + form1._strServerUri.value; }); document.getElementById('xmlresponse').innerHTML = 'Waiting for XML data...'; } catch(err) { document.getElementById('xmlresponse').innerHTML = 'Error fetching XML data' + err; } } </script> </head> <body> <form id="form1" name="form1" method="post" action=""> <div> <h3>Tracking Test Page</h3> <table> <tr> <td class="no-wrap"> Uri to Test </td> <td style="width: 100%"> <input id="_strServerUri" name="_strServerUri" type="text" value="http://YOUR_FREIGHT_HANDLER_SERVER_NAME/TrackingHandler.ashx" /> </td> </tr> <tr> <td class="no-wrap"> Tracking </td> <td style="width: 100%"> <input id="_strNumber" name="_strNumber" type="text" value="" /> </td> </tr> <tr> <td class="no-wrap"> Your Account </td> <td style="width: 100%"> <input id="_strAccountNumber" name="_strAccountNumber" type="text" value="" /> </td> </tr> <tr> <td class="no-wrap"> Your Password </td> <td style="width: 100%"> <input id="_strAccountPassword" name="_strAccountPassword" type="text" value="" /> </td> </tr> <tr> <td> Reference </td> <td style="width: 100%"> <input id="_strReference" name="_strReference" type="text" value="" /> </td> </tr> <tr> <td class="no-wrap"> Uri Return (deprecated) </td> <td style="width: 100%"> <input id="_strUriReturn" name="_strUriReturn" type="text" value="" /> </td> </tr> <tr> <td colspan=2> </td> </tr> </table> <input id="_strModule" name="_strModule" type="hidden" /> </div> </form> <br /> <input id="Quick" type="button" value="Quick Courier" onclick="xmlpostdatafetch('Q');" /> <input id="Warehouse" type="button" value="Warehouse" onclick="xmlpostdatafetch('W');" /> <br /> <br /> <pre id="xmlresponse">Ready to fetch data</pre> </body> </html>
Tracking Sample Input Values
_strNumber = "NCC2012" _strReference = "" _StrModule = "Q"
Module_Code: Q Result_Receiving_Count: 0 Result_Count: 4 Tracking_Number_0: NCC20121012093041 Tracking_Entered_0: 10/12/2012 9:30:41 AM Manifest_Number_0: SJOATD091605 Tracking_Number_1: NCC20121012121756 Tracking_Entered_1: 10/12/2012 12:17:56 PM Manifest_Number_1: SJOATD091605 Tracking_Number_2: NCC20121019194224 Tracking_Entered_2: 10/19/2012 7:42:24 PM Manifest_Number_2: SJOATD091605 Tracking_Number_3: NCC20121020103642 Tracking_Entered_3: 10/20/2012 10:36:42 AM Manifest_Number_3: SJOATD091605
<?xml version="1.0" standalone="yes"?> <NewDataSet> <DataTable> <Module_Code>Q</Module_Code> <Result_Receiving_Count>0</Result_Receiving_Count> <Result_Count>4</Result_Count> <Tracking_Number_0>NCC20121012093041</Tracking_Number_0> <Tracking_Entered_0>10/12/2012 9:30:41 AM</Tracking_Entered_0> <Manifest_Number_0>SJOATD091605</Manifest_Number_0> <Tracking_Number_1>NCC20121012121756</Tracking_Number_1> <Tracking_Entered_1>10/12/2012 12:17:56 PM</Tracking_Entered_1> <Manifest_Number_1>SJOATD091605</Manifest_Number_1> <Tracking_Number_2>NCC20121019194224</Tracking_Number_2> <Tracking_Entered_2>10/19/2012 7:42:24 PM</Tracking_Entered_2> <Manifest_Number_2>SJOATD091605</Manifest_Number_2> <Tracking_Number_3>NCC20121020103642</Tracking_Number_3> <Tracking_Entered_3>10/20/2012 10:36:42 AM</Tracking_Entered_3> <Manifest_Number_3>SJOATD091605</Manifest_Number_3> </DataTable> </NewDataSet>