Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2211
How To: Add click event to Image in tab?
posted

Hey everyone,

Has anyone found a way to wire a click event up to the tab image?

Thanks,

Pat

Parents
No Data
Reply
  • 2211
    posted

     

    If anyone else out there is looking for a work around for this issue, this is the best I can do right now.

    What I do is:

    Trap the click event of the tabs on the client.

    Check to see if the current tab clicked is the same as the current selected tab.  If it is, I assume that they are clicking on the image in the selected tab.

    function uwt_Main_Click(oWebTab, oTab, oEvent){

    //Add code to handle your event here.

    alert('in tab clicked event.');

    var CurrentTab = oWebTab.getSelectedIndex();

    alert('oWebTab Index ' + CurrentTab);

    var newTabClicked = oTab.getIndex();

    alert('oTab Index ' + newTabClicked);

    if(CurrentTab == newTabClicked)

    {

    alert('the tab selected is the tab clicked');

    }

    }

     

    If anyone has a better idea, please share it! I bet you could wire an event in the java script file controlling the tab control I just haven't looked into it.

    Thanks,

    Pat

     

     

Children