Click here to Skip to main content
15,888,027 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Customer's input for tracking order -

For the web tracking API use following WEB SERVICE URL -

http://db1...com:8080/WEB_API/awb_ref_query.asmx

Use the awb_ref_query_xml method for single waybill tracking. Pass the following four parameters to get the result.

a. Airwaybill number
b. type
c. User id
d. Password

Tried code is as follows:-


Below code works fine for retrieving xml data as it is. But we want it in tabular format.How to retrieve it in tabular format?

Thanks in advance.
CVJ

What I have tried:

<!DOCTYPE html>
<html>
<head>
<meta charset ="UTF-8">


<script>
function myFunction() {
  alert("Page is loaded");
}
</script>


<script type ="text/javascript" src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type ="text/javascript">
$(document).ready(function(){
	$.ajax({
	type:"GET",
	url:"new_4.xml", 
	dataType:"xml",
	success: xmlParser
	});
});

function xmlParser(xml){
	$('#load').fadeOut();
	$(xml).find("Scan_Detail").each(function(){
	$('#container').append('<div class ="Scan_Detail"><div class ="Progress"><div class ="Progress_Date">'+ 
	$(this).find("Progress").text() +
	$(this).find("Delivered_Undelivered").text() + 
	$(this).find("Progress_Date").text() + '</div></div></div>');
	});
}
</script>
</head>


<body onload="myFunction()">

<div id ="container">
	<!--load xml data file-->
	<Form action="http://db1...com:8080/WEB_API/awb_ref_query.asmx/awb_ref_query_xml" method="post" target="_blank">
	<!--input type="text" id="str_awb_refno" name="str_awb_refno" placeholder="Enter Your Track ID" required=""-->
	<input type="hidden" id="str_awb_refno" name="str_awb_refno" value="160230230">
	<input type="hidden" id="str_awb_refno_type" name="str_awb_refno_type" value="AWB">
	<input type="hidden" id="str_userid" name="str_userid" value="testapi">
    <input type="hidden" id="str_pwd" name="str_pwd" value="testapi">
	<button type="submit" value="Submit" class="theme-btn btn-style-three" onclick="xmlParser(xml)">Search Now</button>
	<!--load xml data file-->
</div>

</body>
</html>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900