Solved

how to handle click of a tab

Posted on 2013-02-01
3
247 Views
Last Modified: 2013-02-05
In Javascript, how do I handle/hook a click event on a tab?  This is ASP.NET TabPanel.
0
Comment
Question by:HLRosenberger
3 Comments
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 38845334
Use onclientclick event, For sample code check:
http://stackoverflow.com/questions/7684551/pass-parameter-to-js-function-of-tabcontainer-onclientclick
Note: If this event return false then only javascript event executes, but if it returns true btoh javascript event and .NET server click event execute.
0
 
LVL 10

Accepted Solution

by:
Monica P earned 500 total points
ID: 38846549
You can use  OnClientActiveTabChanged property of TabContainer

OnClientActiveTabChanged - The name of a javascript function to attach to the client-side tabChanged event

Also you can use OnClientClick property of Tablpanel

OnClientClick - The name of a javascript function to attach to the client-side click event of the tab.
0
 
LVL 1

Author Closing Comment

by:HLRosenberger
ID: 38852752
Thanks!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
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…

805 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