Solved

how to handle click of a tab

Posted on 2013-02-01
3
254 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
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

617 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