AnsweredAssumed Answered

Pushing query results to innerHTML

Question asked by mbakerDPS on Jul 10, 2014
Latest reply on Jul 11, 2014 by mbakerDPS

Hi all,

 

The geocode details sample has a great method of pushing results from a locator to the innerHTML of a DIV component by looping through the results, pushing them to an array, then joining that array to the DIV by way of the innerHTML property.

 

What I'd like to do is take query results and push them to the DIV the same way. This gives me the option to set HTML styling properties, set hyperlinks, and do things the sample does like set up the zoom button, etc.

 

In the attached HTML, you'll see I'm getting some progress:

- the locators fire with results

- the two queries fire with results

- the displayResults script fires, and the 'red table' is created

 

But...I can't seem to figure out why the results aren't pushing to the content array.

 

UPDATE: Attached code now uses dropdown to set the field that I want to return from the findBoundary query.

 

I've got the two samples side-by-side, and the only thing I can think of is that the way the address locator results are handled are different than the query results - but I'm not sure what that difference is.

 

The zoom buttons and drawing the results on the map aren't required just yet...

 

Any thoughts on where I'm stumped are appreciated!

 

Thank you!!!

 

Message was edited by: Matthew Baker // added updated code

Outcomes