by MarkC
10. March 2010 16:55
We've combined the smooth operation of our Ajax postcode lookup solution with the simple point-and-click configuration of our Javascript Popup postcode lookup to give birth to our new Javascript Embedded postcode lookup solution. Setting up a slick, easy-to-use postcode lookup system has never been easier, giving you all the benefits of high quality data and a streamlined user experience with none of the coding headaches.
Start Configuration
To get started, copy and paste the following code next to any address entry form on your website:
<script type="text/javascript" src="http://webservices.data-8.co.uk/SimplePostcodeLookup/Config.ashx"></script>
Open the page in a web browser and you will see a "Configure Address Lookup" button in your form.
Identify Address Fields
In your form, fill in your address fields with text to indicate what part of the address should be placed in what fields. You can use any of the following values:
- company
- line1
- line2
- line3
- line4
- line5
- line6
- town
- county
- postcode
Complete Configuration
Once you've entered the text in the appropriate fields, click the new "Configure Address Lookup" button. A popup window will appear asking for a few details, including your Data8 username and password, and the type of postcode lookup license to use. Make sure you select the correct license that is configured on your account - ask your account manager if you are not sure. Under the "Appearance" section, make sure you select the "Show addresses in main page" option. Finally, click "Login".
Finished!
You will now be shown a window containing your postcode lookup code. Copy and paste this into your page, overwriting the script you copied in earlier, and refresh your page. You will now see a new "Click to find" button on your form. Simply enter a postcode and click this button - all addresses at that postcode will appear in a list just below the button, and selecting an address from the list will automatically fill in the rest of your form!