Welcome Guest Search | Active Topics | Sign In | Register

Trying to Hide Tab Item on dropdown change event Options
Jazzcatone
Posted: Wednesday, March 27, 2013 10:33:36 AM
Rank: Member
Groups: Member

Joined: 7/21/2007
Posts: 11
Hi and thanks for taking a moment. I have some Javascript that currently does in fact fire on the change event of a dropdown list. I want to simply hide or make visible certain tabItems within my tabstrip control based on the selected value from my dropdown.

I am hoping that I am close but I need a bit of help trying to locate the correct tab item and controlling its visibility. I have tried doing this with C# server side code but I can never seem to get exactly what I'm looking for.If anyone has any suggestions it would be much appreciated.My Javascript is below.

Jason
Code: JavaScript
function ToggleDamageandTheftTabs() {
             //Get the tabstrip fine
              var tabStrip = eo_GetObject('TabStrip1.ClientID');

            //Gets the dropdown and selected value fine
              var typelossvalue = document.getElementById('ddlTypeLoss');
              var myvalue = typelossvalue.options[typelossvalue.selectedIndex].value;
              if (myvalue == "DAMAGE") {
   //Need the correct code to tap into tabstrip object and find the correct item
                  tabStrip.

              }




}
eo_support
Posted: Wednesday, March 27, 2013 11:22:08 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You can do something like this:

Code: JavaScript
var tabItem = tabStrip.getTopGroup().getItemByIndex(index);


The above code returns a NavigationItem object:

http://www.essentialobjects.com/doc/1/jsdoc.public.navigationitem.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.