-
Notifications
You must be signed in to change notification settings - Fork 4
/
address-lookup-standard.html
77 lines (73 loc) · 3.12 KB
/
address-lookup-standard.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
<head>
<title>Autocomplete Address Lookup Example | Addy.co.nz</title>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no">
<meta charset="UTF-8">
<link type="text/css" rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500">
<!-- only use if loadCss URL query attribute flag is set to false -->
<link type="text/css" rel="stylesheet prefetch" href="./css/addy.min.css">
<!-- or CDN -->
<!-- <link type="text/css" rel="stylesheet prefetch" href="https://www.addysolutions.com/address-lookup/1.6.2/css/addy.min.css"> -->
<style>
body {
font-family: 'Roboto', sans-serif;
font-size: 10pt;
}
.field {
width: 300px;
}
.label {
width: 120px;
}
</style>
</head>
<body>
<form>
<table>
<tr>
<td class="label">Address Line 1</td>
<td><input type="text" class="field" id="address1" placeholder="Start typing an address.." auto-complete></td>
</tr>
<tr>
<td>Address Line 2</td>
<td><input type="text" class="field" id="address2"></td>
</tr>
<tr>
<td>Suburb</td>
<td><input type="text" class="field" id="suburb"></td>
</tr>
<tr>
<td>City</td>
<td><input type="text" class="field" id="city"></td>
</tr>
<tr>
<td>Postcode</td>
<td><input type="text" class="field" id="postcode"></td>
</tr>
</table>
</form>
<script type="text/javascript">
// This is the callback function to initialise the address lookup script
function initAddy() {
var addyComplete = new AddyComplete(document.getElementById("address1"));
addyComplete.options.excludePostBox = false;
addyComplete.fields = {
address1: document.getElementById("address1"),
address2: document.getElementById("address2"),
suburb: document.getElementById("suburb"),
city: document.getElementById("city"),
postcode: document.getElementById("postcode")
}
}
</script>
<!-- for NZ country -->
<!-- <script src="./js/addy.js?nzKey=e52121541ba843c2bb3b1b0dc0022a4c&country=nz&callback=initAddy" async defer></script> -->
<!-- or CDN -->
<script src="https://www.addysolutions.com/address-lookup/1.6.2/js/addy.min.js?nzKey=e52121541ba843c2bb3b1b0dc0022a4c&country=nz&callback=initAddy" async defer></script>
<!-- for AU country -->
<!-- <script src="https://www.addysolutions.com/address-lookup/1.6.2/js/addy.min.js?auKey=demo-api-key&country=au&callback=initAddy" async defer></script> -->
<!-- or CDN -->
<!-- <script src="./js/addy.min.js?auKey=demo-api-key&country=au&callback=initAddy" async defer></script> -->
</body>
</html>