Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1322
  • Last Modified:

Attach onclick event to TabContainer/TabPanel

I have a simple AJAX TabContainer control on a page with 4 tab panels. When the user clicks the last tab I need a message box to flash up. This event needs to be enabled/disabled on the basis of a value in a database and so code behind control is required (I write in VB). Adding an OnClientClick event to the tabpanel stops the entire control from rendering, whether I do it on the page or in code-behind. What am I missing?
0
deveson
Asked:
deveson
1 Solution
 
Gurvinder Pal SinghCommented:
In jquery itself, you can check the variable and bind/unbind the onclick event

if(  flag == true )
{
   $("#last_tab").unbind("click");
}
else
{
   $("#last_tab").bind("click");
}

0
 
devesonAuthor Commented:
I am unfamiliar with jquery but guess will need to learn this now to achieve objective
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now