Getting Started with Client Side Javascript
Using client side javascript is the simplest way of integrating ePostcode into existing or new build websites.
To get you started, we suggest you download the following zip: html zip file
Once you have unzipped the files simply double-click the DirectAccess.htm file to open it in a browser and press the 'Find Address' button.
You should receive the following Error Message 'Invalid Account' in the drop down listbox.
This is because the ePostcode AccountName and GUID are not using your own Account Details.
If you have not already signed-up for an account click here Sign-Up Now.
You will receive your Access Codes by email and you will receive 50 free credits.
When you have your Access Codes ready, open the DirectAccess.htm file in 'Source View' by opening it in a common text editor like Notepad.
You will see 2 lines near the top that look like the lines below:
<input id=epcAccountName type=hidden value=xxxxxxxx name=epcAccountName>
<input id=epcGUID type=hidden value=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=epcGUID> |
Replace the XXXXXXXX value with your ePostcode AccountName.
Replace the XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX value with your ePostcode GUID.
Save and Close the DirectAccess.htm.
Now, reopen the DirectAccess.htm file in a browser, enter a Postcode in the 'Search Postcode' input box and press the 'Find Address' button.
If the Postcode is valid and you have entered your ePostcode Account Details correctly you will receive a list of Addresses for that Postcode. This functionality uses the SearchMulti function of the ePostcode web service.
Now scroll the list and select the address you want by clicking on it. Press the 'Get Selected Address' button. You should now be shown the Full Postal Address Details for that address. This functionality uses the GetAddress function of the ePostcode web service and you have just used your first credit by returning the address details.
It's that simple, you now have access to a client-side Address Search. Every time you press the 'Get Selected Address'' button on the page your Credit Limit will be decremented by 1 Credit.
So, how does it work?
If you inspect the 'Source View' of the DirectAccess.htm file in Notepad, you will see the following 2 lines
SSL Note: If you are using Secure Socket Layer (SSL) pages please replace the 2 lines above with the following:
These are the Javascript files that do all the hard work by calling the SearchMulti and GetAddress method of the eSortcode web service and returning the details to the DirectAccess.htm file.
The ePostcodeDemoFieldsSSL.js Javascript file contains 2 procedures called 'GetAddressList' and 'GetAddress' which are called when you press the 'Find Address' and 'Get Selected Address' buttons respectively on the page. See below.
<input id=epcFindAddresses onclick=javascript:GetAddressList(); type=button value="Find Address" name=epcFindAddresses> |
<input id=epcGetAddress onclick=javascript:GetAddress(); type=button value="Get Selected Address" name=epcGetAddress> |
The 'GetAddressList' and 'GetAddress' procedures both use the Values from the 4 hidden fields shown below:
<input id=epcServiceName type=hidden value=ValidateAccount name=epcServiceName>
<input id=epcAccountName type=hidden value=xxxxxxxx name=epcAccountName>
<input id=epcGUID type=hidden value=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx name=epcGUID>
<input id=epcIPAddress type=hidden name=epcIPAddress> |
The 'GetAddressList' also uses the Values entered by the user for Search Postcode, Search Company, Search Street, Search Locality, Search Town and SearchNumber shown below:
<tr>
<td>Search Postcode</td>
<td><input name="epcSearchPostcode" type="text" id="epcSearchPostcode"></td>
</tr>
<tr>
<td>Search Company</td>
<td><input name="epcSearchCompany" type="text" id="epcSearchCompany"></td>
</tr>
<tr>
<td>Search Street</td>
<td><input name="epcSearchStreet" type="text" id="epcSearchStreet"></td>
</tr>
<tr>
<td>Search Locality</td>
<td><input name="epcSearchLocality" type="text" id="epcSearchLocality"></td>
</tr>
<tr>
<td>Search Town</td>
<td><input name="epcSearchTownOrCity" type="text" id="epcSearchTownOrCity"></td>
</tr>
<tr>
<td>Search Number</td>
<td><input name="epcSearchNumber" type="text" id="epcSearchNumber"></td>
</tr>
|
The 'GetAddress' also uses the Value Field of the Selected Index of the select box (This value is the AbsRecNum value which is a unique id that every address has and is set when the 'Find Address' button is pressed) shown below:
<select id=epcAddressList style="WIDTH: 500px" name=epcAddressList></select> |
So, when the 'Find Address' button is pressed the javascript file calls the SearchMulti function of the epostcode webservice and populates the dropdown list with the returned list addresses and their corresponding Unique IDs (assuming valid details).
And, when the 'Get Selected Address' button is pressed the javascript file calls the GetAddress function of the epostcode webservice and populates the remaining text boxes with the selected Address Details (assuming valid details).
How do I integrate this into my site?
It should be very easy, the simplest way is to copy and paste the html between the
tags into your own page. You can then format and position the fields as you wish.
You MUST include the reference to the Javascript file in your page and the following input fields also MUST be present (but not necessarily visible):
NB: Do NOT change the name of any of the input or return fields as the Javascript file requires them to have specific names in order for it to work
Fields that must exist:
epcServiceName
epcAccountName
epcGUID
epcIPAddress
epcSearchPostcode
epcSearchCompany
epcSearchStreet
epcSearchLocality
epcSearchTownOrCity
epcSearchNumber
epcAddressList
epcFindAddresses
epcGetAddress
You do not necessarily have to include all of the return fields because the javascript file ignores them if they don't exist.
Return Fields:
epcCompany
epcDepartmentName
epcSubBuildingName
epcBuildingName
epcNumber
epcDependentStreet
epcStreet
epcDoubleDependentLocality
epcLocality
epcTownOrCity
epcCounty
epcPostcode
epcAddressLine1
epcAddressLine2
epcAddressLine3
epcAddressLine4
epcAddressLine5
epcGridEasting
epcGridNorthing
epcPostOfficeBox
epcUserCategory
epcIsError
epcErrorMessage
epcAbsRecNum
Remember to always include the reference to the javascript file and all of the input fields (
do not rename these) and remember to enter your Access Codes. If you download your own local copies of the javascript files, we recommend that you DO NOT make any changes to the ePostcodeProxy.js file as this will probably break the code.
For a full technical description of the ePostcode web service and the 3 methods click on the following link:
Services.
If you have any questions feel free to contact us at the following link
Contact Us.
Getting started with .net
Using .net technology to consume the ePostcode web service is very simple.
Microsoft.net makes life easy for us by handling the SOAP communication and building a Proxy class to wrapper the web service.
The first thing you will need to do within your .net project is add a reference to the ePostcode Web Service as follows:
At the Add Web Reference Dialog enter the following URL: http://ws.epostcode.com/uk/postcodeservices13.asmx
and press the 'Go' button.
Change the Web reference name to ePostcode.
Press the 'Add Reference' button.
When you add the Web Reference a proxy class is created and can be viewed by opening the Reference.cs (Reference.vb in VB.net) in code view.
In this example we are using the SearchPremise_ByPostcode and GetPremiseAddress methods of the ePostcode web service to return a list of Addresses on a Postcode Search and retrieving the Full Postal Address of the Selected Address.
At the point in your code where you want to return the List of Addresses put in the following code. For this example the code is inside the Click Event of a Button control as follows:
C# Handler Example
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Etellect.IQ.ECore;
using Etellect.IQ.ECms.ClientConfiguration;
namespace Etellect.Common.Controls.EPostcode
{
/// <summary>
/// Summary description for epostcode_lookup
/// </summary>
public class epostcode_lookup : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/application";
Client myClient = Client.Create(context);
ePostcode_Licence = ##ENTER YOUR LICENSE GUID HERE##;
ePostcode_Account = ## ENTER YOUR ACCOUNT NAME HERE ##t;
var searchResult = DoSearch(context);
context.Response.Write(searchResult.ToJson());
}
public bool IsReusable
{
get
{
return false;
}
}
private enum Status
{
OK = 0,
notfound = 1,
err = 2
}
private bool DEBUG = true;
protected string ePostcode_Licence = ""; // get this from the ClientObject
protected string ePostcode_Account = "";
protected const string ePostcode_MachineID = "";
public class Result
{
public string Status { get; set; }
public string Message { get; set; }
public List<PostcodeSearchAddress> Addresses { get; set; }
}
public class PostcodeSearchAddress
{
public string Organisation { get; set; }
public string BuildingName { get; set; }
public string SubBuildingName { get; set; }
public string Address1 { get; set; }
public string Address2 { get; set; }
public string Address3 { get; set; }
public string TownCity { get; set; }
public string Postcode { get; set; }
public string DependentLocality { get; set; }
public string CountyAdministrative { get; set; }
public string FullAddress { get; set; }
}
private Result DoSearch(HttpContext context)
{
string postcode = context.Request.QueryString["postcode"];
string nameNumber = context.Request.QueryString["nameNumber"];
Etellect.IQ.Web.References.EPostcode.PostcodeServices13 WS = null;
Etellect.IQ.Web.References.EPostcode.ListAllAddressPremises addressPremises = null;
bool ErrorFlag = false;
string sTmp = string.Empty;
Result result = new Result();
if(string.IsNullOrEmpty(postcode))
{
// WriteToLog("Blank postcode")
result.Status = "err";
result.Message = "blank postcode";
}
//else if(!Regex.IsMatch(Postcode, SnapDDA.Site.SanitisationRegexes(SnapDDA.Site.SanitisationMethod.UKPostcode)))
//{
// // WriteToLog("Invalid postcode")
// sOut.Append(@"{""status"":""err"",""descr"":""invalid postcode""}");
//}
else
{
WS = new Etellect.IQ.Web.References.EPostcode.PostcodeServices13();
WS.Timeout = 3000;
// WriteToLog("Looking up postcode: """ & Postcode & """")
try{
// addresses = WS.AdvancedSearch(Postcode, ePostcode_Account, "", "", ePostcode_Licence)
// addresses = WS.SearchPremise_ByPostcode(Postcode, ePostcode_Account, ePostcode_Licence, "")
addressPremises = WS.GetPremiseAddressesFromPostcodeAndHouseNumber(postcode, nameNumber, "100", ePostcode_Account, ePostcode_Licence, "");
}
catch(Exception ex)
{
// WriteToLog("Caught WS error - " & ex.Message)
result.Status = "err";
result.Message = "WS error 1"; // helpful message...
ErrorFlag = true;
}
if(!ErrorFlag)
{
if(addressPremises == null)
{
// think this might be an error, mais tant pis...
//WriteToLog("addresses = null")
result.Status = "not found";
result.Message = "";
}
else
{
if(addressPremises.IsError)
{
// WriteToLog("WS IsError = " & addressPremises.ErrorMessage)
result.Status = "err";
result.Message = "WS error 2";
}
else
{
// WriteToDebugLog("Addresses.list.length=" & addressPremises.List.Length)
if(addressPremises.List.Length == 0)
{
// WriteToDebugLog("Addresses.list.length=0: Nothing found")
result.Status = "not found";
result.Message = "";
}
else if((addressPremises.List.Length == 1) && (addressPremises.List[0].Return_Code == "0"))
{
// WriteToDebugLog("Address.list.length=1 + Return_Code=0: Nothing found")
result.Status = "not found";
result.Message = "";
}
else
{
Regex re = new Regex(@"\s{2,}");
result.Status = "OK";
result.Message = "";
result.Addresses = new List<PostcodeSearchAddress>();
foreach (Etellect.IQ.Web.References.EPostcode.AddressPremise a in addressPremises.List)
{
if(a.Return_Code == "0")
{
// skip nulls
// WriteToDebugLog("Return_Code=0: skipped")
}
else
{
PostcodeSearchAddress address = new PostcodeSearchAddress();
if (a.Organisation.Length > 0)
{
address.Organisation = a.Organisation;
}
if(a.Sub_Building_Name.Length > 0)
{
// "Flat 10"
// Prepend this to the building name
if(a.Building_Name.Length == 0)
a.Building_Name = a.Sub_Building_Name;
else
a.Building_Name = a.Sub_Building_Name + ", " + a.Building_Name;
}
if(a.Building_Name.Length > 0)
{
// Check if this building name is just a number, e.g. "9-17". In which case, if the Number is empty, use this as the number
if(Regex.IsMatch(a.Building_Name, @"^[\d\-\s]+$"))
{
// it's just a number...
if(a.Number.Length > 0 )
{
// But they're using a number too. So treat this building name as a building name
address.BuildingName = a.Building_Name;
}
else
a.Number = a.Building_Name;
}
else
address.BuildingName = a.Building_Name;
}
if(a.Number.Length + a.Street.Length > 0)
{
if(a.Number.Length == 0)
address.Address1 = a.Street;
else
{
if(a.Street.Length == 0)
address.Address1 = a.Number;
else
address.Address1 = a.Number + " " + a.Street;
}
}
if(a.Dependent_Locality.Length > 0) address.DependentLocality = a.Dependent_Locality;
if(a.Post_Town.Length > 0 && a.County_Administrative.Length > 0 && a.Post_Town == a.County_Administrative)
address.TownCity = a.Post_Town; // ' London, Manchester, etc. - don't add the county
else
{
if(a.Post_Town.Length > 0)
address.TownCity = a.Post_Town;
if(a.County_Administrative.Length > 0)
address.CountyAdministrative = a.County_Administrative;
}
if (a.Postcode.Length > 0)
{
address.Postcode = a.Postcode;
}
var tmp = string.Empty;
if (!string.IsNullOrWhiteSpace(address.BuildingName))
tmp = address.BuildingName;
if (!string.IsNullOrWhiteSpace(address.SubBuildingName))
{
tmp = (tmp.Length > 0 ? tmp + ", " + address.SubBuildingName : address.SubBuildingName);
}
if (!string.IsNullOrWhiteSpace(address.Address1))
{
tmp = (tmp.Length > 0 ? tmp + ", " + address.Address1 : address.Address1);
}
address.Address1 = tmp; // merge the building and street into line 1.
address.FullAddress = Regex.Replace(a.FullAddress, @"(^\\r\\n)|(\\r\\n$)|(\\r\\n\s+(?=\\r))", "");
address.FullAddress = Regex.Replace(address.FullAddress, @"\\r\\n", ", ");
result.Addresses.Add(address);
}
}
}
}
}
}
}
return result;
}
}
}
|
At the point in your code where you want to get a Full Postal Addresses from the list box (e.g. in the SelectedIndexChanged Event of the listbox) put in the following code:
When you have your Access Codes ready, you will need to change the following values in the Web.config to get the code above to work:
Change the XXXXXXXX value to be your ePostcode AccountName.
Then change the XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX value to be your ePostcode GUID.
Remember and add the following lines into the Page_Load Event:
msGUIDDemo=ConfigurationSettings.AppSettings["DemoGuid"];
msAccountNameDemo=ConfigurationSettings.AppSettings["DemoAccountName"];
|
The other methods of the ePostcode web service can be used in a similar way.
For a full technical description of the ePostcode web service and the 3 methods click on the following link:
Services.
If you have any questions feel free to contact us or raise as support request within your online portal account area.
To integrate the epostcode web services with PHP pages, we have developed a sample web application that provides an example of a simple web service interface. Please click here to download the PHP sample code.
To run the ePostcode PHP Client sample, you must do the following:
- Set up your web server.
- Download and install PHP 5.2.6 from http://www.php.net/downloads.php.
- Decompress ePostcode_PHP.zip and put all files and folders to your web folder.
- Start web server.
- Update epostcode.php with your account id and licence key as issued by epostcode.com website (you will need to search for the 'enter account id here' and 'enter license key here')
- Browse ePostcode.php in your browser
Please use this example code to create your own web service interface for use in your application.
To integrate the epostcode web services with Java Server Pages, we have developed a sample web application that provides an example of a simple browser based interface. Please
click here to download the JSP sample project
.
Installation:
- Install Tomcat v5.0 or higher.
- Deploy the WAR file or the webapp it contains.
- Open the project or invoke the index.jsp in a browser.
The ePostcode_JSP.rar file structure is as follows:
/ePostcode.war : The web application WAR file.
/WEB-INF
/classes : Contains Java class files for Axis.
/lib : Contains Axis JAR files.
/META-INF : Contains meta information about the WAR file.
/src : Contains Java source code (Axis-created Java stubs).
/Images : Image files.
/css : Css files.
/index.jsp : JSP file for Quick Address search.
/readme.txt : This readme file.
Note:
-
For Convenience Axis JAR files that are required for this samples are included (/WEB-INF/lib).
-
Class files that are part of com.epostcode.ws packages were created using Axis wsdl2java utility.
Example:
c:\>java org.apache.axis.wsdl.WSDL2Java
http://ws.epostcode.com/uk/PostcodeServices09.asmx?WSDL
For more information on jars and WSDL2Java utility, see
http://ws.apache.org/axis/
Getting Started with ASP and VBScript
Using The Microsoft MSXML Component to call the ePostcode Web Service
You will need to download and install the MSXML 4.0 SP2 from Microsoft Downloads.
Please Note: We have recently updated the web service and added new functionality for Geographic Data and 'Nearest To' Data as well as a major upgrade to our Address and Postcode Lookup functions. Because of this some of our downloads are currently unavailable. We are endeavouring to get these published as soon as possible. Meanwhile if you require any assistance with integration please give us a call.
Downloads:
Classic ASP download. This is a download of some simple Classic ASP pages that can be incorporated in to your site. (Beginner/Intermediate developer)
This example uses the SearchPremise_ByAddress and GetPremiseAddress methods of the ePostcode web service: http://ws.epostcode.com/uk/postcodeservices.asmx
The following code snippets detail how to retrieve a list of Addresses by searching on Postcode and retrieving the Full Postal Address for the selected Address.
Step 1
The first thing to do is to set up the Initial Search Postcode page. In the download this page is called ePostcodeASP1.asp. This is a simple page consisting of 3 Input boxes and a Submit button. The html for this page is shown below:
<html>
<body>
<form method="post" action="ePostcodeASP2.asp">
<table ID="Table1">
<tr>
<td>Enter ePostcode Account Name</td>
<td><input type="text" name="AccountName" ID="Text1"></td>
</tr>
<tr>
<td>Enter ePostcode GUID</td>
<td><input type="text" name="LicenceID" ID="Text2"></td>
</tr>
<tr>
<td>Enter Postcode</td>
<td><input type="text" name="Postcode" ID="Text3"></td>
</tr>
</table>
<BR>
<input type="submit" value="Get Address List">
</form>
</body>
</html> |
The post Action of this page is "ePostcodeASP2.asp" and when the "Get Address List" button is pressed the ePostcodeASP2.asp page is loaded.
Step 2
The next thing to do is to set up the page that returns the list of addresses. In the download this page is called ePostcodeASP2.asp. This page consists of server-side VBScript code that does the hard work of calling the web service and populating an Array containing the ListAddress and the AbsRecNum of the returned Addresses.
This data is then populated into a listbox when the html is rendered.
The vbscript for this page is shown below:
<%
Dim xmlhttp,Fields,URL,objReturn, s
Dim arrList()
URL = "http://ws.epostcode.com/uk/postcodeservices.asmx?op=SearchPremise_ByPostcode"
Fields = "sPostcode=" & Request.Form("Postcode") & _
"&AccountName=" & Request("AccountName") & _
"&LicenceID=" & Request("LicenceID") & _
"&MachineID="
Set xmlhttp = CreateObject("MSXML2.xmlhttp")
xmlhttp.Open "POST", URL, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.Send Fields
Set objReturn = CreateObject("MSXML2.DOMDocument")
objReturn.LoadXml xmlhttp.responseText
If objReturn.hasChildNodes Then
Dim i,sAbsRecNum ,sListAddress,objReturn2
Dim iNumAddresses
Set objReturn2 = CreateObject("MSXML2.DOMDocument")
iNumAddresses = objReturn.getElementsByTagName("ListAddressPremise").Length
If iNumAddresses > 0 Then
ReDim arrList(iNumAddresses,1)
End If
For i = 0 To objReturn.getElementsByTagName("ListAddressPremise").Length - 1
objReturn2.loadXML objReturn.getElementsByTagName("ListAddressPremise").Item(i).XML
If objReturn2.hasChildNodes Then
sAbsRecNum = objReturn2.getElementsByTagName("Unique_Delivery_Point").Item(0).Text
sListAddress = objReturn2.getElementsByTagName("List_Address").Item(0).Text
arrList(i,0)=sAbsRecNum
arrList(i,1)=sListAddress
End If
Next
End if |
The Addresses are populated into a Listbox from the array as shown below in the html:
<html>
<body>
<form method="post" action="ePostcodeASP3.asp" ID="Form1">
Select Address From List
<INPUT id="Hidden1" type="hidden" name="AccountName" value="<% = Request("AccountName") %>">
<INPUT id="Hidden2" type="hidden" name="LicenceID" value="<% = Request("LicenceID") %>">
<BR>
<BR>
<select name="ListAddress" size="20" ID="Select1">
<%For i = 0 To UBound(arrList) - 1%>
<option value="<% = arrList(i,0) %>">
<% = arrList(i,1) %>
</option>
<%Next%>
</select>
<BR>
<BR>
<input type="submit" name="btnSubmit" value="Get Address">
</form>
</body>
</html> |
The post Action of this page is "ePostcodeASP3.asp" and when the "Select Address" button is pressed the ePostcodeASP3.asp page is loaded.
Step 3
The next thing to do is to set up the page that returns the selected address. In the download this page is called ePostcodeASP3.asp. This page consists of server-side VBScript code that returns the selected address from the AbsRecNum of the selected address obtained from the selected Item in the Listbox on ePostcodeASP2 page.
This data is then populated when the html is rendered.
The vbscript for this page is shown below:
<%
Dim xmlhttp
Dim Fields
Dim URL
Dim objReturn
URL = "http://ws.epostcode.com/uk/postcodeservices.asmx?op=GetPremiseAddress"
Fields = "sUniqueDeliveryPointID=" & Request("ListAddress") & _
"&AccountName=" & Request("AccountName") & "&LicenceID=" & Request("LicenceID") & "&MachineID="
Set xmlhttp = CreateObject("MSXML2.xmlhttp")
xmlhttp.Open "POST", URL, False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.Send Fields
Set objReturn = CreateObject("MSXML2.DOMDocument")
objReturn.loadXML xmlhttp.responseText
If objReturn.hasChildNodes Then
'continue
Else
Response.Write "Error"
Response.End
End If
%> |
The Address is populated as shown below in the html.
<html>
<body>
<table>
<%If Request.Form("btnSubmit")="Get Address" then%>
<%If objReturn.getElementsByTagName("Return_Code").Item(0).Text = "1" then%>
<tr>
<td>Organisation Department</td>
<td><% = objReturn.getElementsByTagName("Organisation_Department").Item(0).Text %></td>
</tr>
<tr>
<td>Organisation</td>
<td><% = objReturn.getElementsByTagName("Organisation").Item(0).Text %></td>
</tr>
<tr>
<td>Sub Building Name</td>
<td><% = objReturn.getElementsByTagName("Sub_Building_Name").Item(0).Text %></td>
</tr>
<tr>
<td>Building</td>
<td><% = objReturn.getElementsByTagName("Building_Name").Item(0).Text %></td>
</tr>
<tr>
<td>Number</td>
<td><% = objReturn.getElementsByTagName("Number").Item(0).Text %></td>
</tr>
<tr>
<td>Dependent Street</td>
<td><% = objReturn.getElementsByTagName("Dependent_Street").Item(0).Text %></td>
</tr>
<tr>
<td>Street</td>
<td><% = objReturn.getElementsByTagName("Street").Item(0).Text %></td>
</tr>
<tr>
<td>Double Dependent Locality</td>
<td><% = objReturn.getElementsByTagName("Double_Dependent_Locality").Item(0).Text %></td>
</tr>
<tr>
<td>Dependent Locality</td>
<td><% = objReturn.getElementsByTagName("Dependent_Locality").Item(0).Text %></td>
</tr>
<tr>
<td>Post Town</td>
<td><% = objReturn.getElementsByTagName("Post_Town").Item(0).Text %></td>
</tr>
<tr>
<td>Country</td>
<td><% = objReturn.getElementsByTagName("Country").Item(0).Text %></td>
</tr>
<tr>
<td>Postcode</td>
<td><% = objReturn.getElementsByTagName("Postcode").Item(0).Text %></td>
</tr>
<%Else%>
<tr>
<td>Error Message</td>
<td><% = objReturn.getElementsByTagName("Return_Code").Item(0).Text %></td>
</tr>
<%End If%>
<%End If%>
</table>
</body>
</html> |
If you have not already signed-up for an account click here Sign-Up Now.
You will receive your Access Codes by email and you will receive 50 free credits.
When you have your Access Codes ready you will be able to use them in the above example. You can then incorporate the code into your own ASP pages.
The other methods of the ePostcode Web Service can be used in a similar way.
For a full technical description of the ePostcode web service and the 3 methods click on the following link Services.
If you have any questions feel free to contact us at the following link Contact Us.