Populating infoWindow with query data

Discussion created by samirgambhir on Mar 7, 2011
I have a number of layers to query. I am allowing the user to select the layer from a combo box to query. Upon selection, the layer is added to the map and the query function is then called (query function code is attached). I wish to run a query task on the selected layer and display the results in an info window. The query results need to be formatted e.g. reporting the data in percentages rounded to second digit. I have created new variables to pass those on to the infoWindow, but firebug informs me that these variables are undefined. I am not sure how to fix this code. Thanks for any help you can provide. Please let me know if you need more information.