AnsweredAssumed Answered

How to pass variables to a deferred infoWindow function

Question asked by stevel on May 25, 2011
Latest reply on May 25, 2011 by stevel
The sample at http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_infowindowdeferred.html shows how to run a function to format the contents of an infoWindow.

It says "a function (getTextContent) is defined that will execute when a [feature] is clicked" and "In the getTextContent function we have access to the clicked graphic".

The content of the infoWindow is set with:

template.setContent(getTextContent);


and the function references the graphic object using:

function getTextContent(graphic) {


Is it possible to pass other variables into this function, so that they could be used within the function?

Thanks,
Steve

Outcomes