Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am updating a webApp using ArcGIS Javscript API 2.1 I have an infoWindow with tabs which shows all of the features in my map. I built it based on this example:

I would like to have the infoWindow open with the tab that matches the selected feature on top (or, selected). Currently, in my map and in the above example, the tab that opens is the tab last clicked during the preceding instance of the infoWindow.

I see there is a 'selected' property for tab containers. I can set it for the initial layout of the infoWindow onload in HTML, but setting it in the Javascript code does not seem to work..

Does anyone have an idea how I may do this? Thanks,

share|improve this question
off-topic, but that site you referenced looks like it's scraping the Esri sample site, which is probably the more authoritative place to obtain samples – Stephen Lead Sep 25 '12 at 2:11
yes Stephen you're right, it is derived from here: [link]… [/link] – JasonBK Sep 25 '12 at 15:09
up vote 2 down vote accepted

Use .selectChild().

In your example, if I click the map to identify, then run this in the console:


The tab container in the info window switches to the "Tax Parcels tab. Running:


Switches back to the "Buildings" tab.

share|improve this answer
Hello, I deleted my old comment. Thank you, now that I placed this function correctly, it works perfectly. – JasonBK Sep 26 '12 at 16:51
Glad it worked :). – Derek Swingley Sep 26 '12 at 17:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.