Skip to main content
Known Participant
April 23, 2018
Question

Can I use Java script for postcode lookup?

  • April 23, 2018
  • 3 replies
  • 967 views

Is there a script that will enable me to enter a postcode to then be presented with a list off addresses to select?  Can You connect to the royal mail postcode search system?

Thanks.

This topic has been closed for replies.

3 replies

Legend
April 23, 2018

Postcodes in the UK cover a single street, never more, often less. So address lookup is very common on web sites: only the house number/name and postcode is needed.

try67
Community Expert
Community Expert
April 23, 2018

Ah yes, it's the same in The Netherlands. In that case it would make sense to use it, I guess... Although if that's the case then just entering the postcode and house number (and possibly name) should be enough, even without the rest of the address.

try67
Community Expert
Community Expert
April 23, 2018

I'd recommend forgetting about it. Most people know their own postcode and it's just not worth the effort, time and money it will cost to implement such a feature.

If you want you can implement a validation of the postcode itself, though, to make sure it's in the right format.

Known Participant
April 23, 2018

I wanted to be able to take a post code from a client and then prepopulate a field with their address to avoid user error/spelling issues, especially with Welsh addresses.   Thanks anyway, I'll forget that train of thought and go back to manual input.  Thanks for trying.

try67
Community Expert
Community Expert
April 23, 2018

Postcodes usually cover more than one address... How were you expecting to do that? Or do you mean just the city/village name?

try67
Community Expert
Community Expert
April 23, 2018

Do they offer a web-service that can be accessed using SOAP or an HTTP request and that returns this information?

Known Participant
April 23, 2018

I would be lying if I said I knew the answer to that one.  If no, I'm guessing the answer to my original question is no.  If yes, there may be hope?

try67
Community Expert
Community Expert
April 23, 2018

That's correct. If that doesn't exist the answer is no. If it does, the answer is yes, but it's complicated to implement...

The only other option is to take a text file that contains all the possible results and embedding it in the PDF, but I think that's probably not an ideal solution, for many reasons.