Solved

Attach onclick event to TabContainer/TabPanel

Posted on 2011-09-13
2
1,115 Views
Last Modified: 2012-05-12
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
Comment
Question by:deveson
2 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 125 total points
ID: 36528390
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
 

Author Closing Comment

by:deveson
ID: 36976778
I am unfamiliar with jquery but guess will need to learn this now to achieve objective
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error in JQuery 5 39
Javascript and Jquery not firing 9 43
Code works but it's slow 24 45
ASP.NET MVC 2 6
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now