Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Initial commit of very basic demo page
Browse files Browse the repository at this point in the history
  • Loading branch information
jbate committed Sep 7, 2015
1 parent 98aa9dc commit 2bf9ba5
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions demo.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<title>Contact Data Services - sample code</title>
</head>
<body>
<form>
<label for="country">Country</label>
<select name="country">
<option value="gbr">UK</option>
<option value="usa">USA</option>
</select>

<label for="input">Address</label>
<input type="text" name="address-input">
</form>
<div id="picklist"></div>
<div id="formatted-address"></div>

<script src="src/js/contact-data-services.js"></script>
<script>
var options = {
token: "4f0214b7-b7ec-4096-a19e-502b8046278c",
address: {
elements: {
input: document.querySelector("input[name='address-input']"),
country: document.querySelector("select"),
picklist: document.querySelector("#picklist"),
formattedAddress: document.querySelector("#formatted-address")
}
}
};
contactDataServices.init(options);
</script>
</body>
</html>

0 comments on commit 2bf9ba5

Please sign in to comment.