0

I have created a variable from a selected index in an array. Inside the selected index I get a string value. When I step through this I can see the value, but the variable is "undefined". When passing that variable after the creation is completed it remains undefined.

"numResult" is the user defined selection from the array.

var faddress = geocodeResults[numResult].address.value;

showResults.infoTemplate.setContent("<b>Name: " + faddress + "</b>");
3
  • Can you show geocodeResults structure ? Commented Jan 25, 2013 at 17:13
  • 1
    It's very hard to tell without knowing what is the exact value of numResult and geocodeResults. Commented Jan 25, 2013 at 17:14
  • to test I've passed in the first index here is some info from the call stack: geocodeResults: Array[50] 0: a address: "New York City, New York, United States" attributes: Object location: a score: 100 __proto__: Object Commented Jan 25, 2013 at 17:22

1 Answer 1

0

I had to remove .value, the call stack was undefined because of .val..... over analyzed again

Thanks everyone

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.