I'm trying to use the onValidAddress call back.

The code is simply:

onValidAddress: function(address) { alert(address); }

When the alert box shows up, the value displayed is "undefined". I pulled the sample from here.

Basically, I'm trying to get the component parts of an address after it's been validated. In particular the primary_number, street_name and zipcode.

asked 05 Feb, 23:00

School%20Office%20Pro's gravatar image

School Office Pro
367
accept rate: 0%

edited 03 Apr, 15:37

Jeffrey%20-%20SmartyStreets's gravatar image

Jeffrey - SmartyStreets ♦♦
2.2k14


Astute observation! This is a bug that we will be correcting shortly. Be advised, however, that this implementation of the API does not provide a component-ized street address (so primary number and street name will be on the same field). The ZIP Code would be in its own field.

If you need the individual components parsed you should be using the REST API. You can, of course, call this API using javascript using JSONP. See my other answer here for more information regarding this option.

link

answered 06 Feb, 11:50

Mike%20-%20SmartyStreets's gravatar image

Mike - SmartyStreets
10.4k3
accept rate: 56%

edited 03 Apr, 15:37

Jeffrey%20-%20SmartyStreets's gravatar image

Jeffrey - SmartyStreets ♦♦
2.2k14

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×47
×1

Asked: 05 Feb, 23:00

Seen: 140 times

Last updated: 03 Apr, 15:37