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

x
?
Solved

how to handle click of a tab

Posted on 2013-02-01
3
Medium Priority
?
263 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 36

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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…
Suggested Courses

877 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