1

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: http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples_start.htm#jssamples/identify_drilldown.html

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,

asked Sep 24, 2012 at 20:43
2

1 Answer 1

2

Use .selectChild().

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

dijit.byId("tabs").selectChild("parcelTab")

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

dijit.byId("tabs").selectChild("bldgTab") 

Switches back to the "Buildings" tab.

answered Sep 24, 2012 at 21:19
2
  • 1
    Hello, I deleted my old comment. Thank you, now that I placed this function correctly, it works perfectly. Commented Sep 26, 2012 at 16:51
  • Glad it worked :). Commented Sep 26, 2012 at 17:46

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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.