Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

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

How can I associate two javaScript functions or methods with onClick event in ASP.NET ?

How can I associate two javaScript functions or methods with onClick event in ASP.NET ?
like this:
OnClick="func()"
How can I associate another one?
0
mazin_kf
Asked:
mazin_kf
1 Solution
 
David H.H.LeeCommented:
Dear mazin_kf,
It depend how you control the javascript logic. Basically, you can code something like this:
eg:
OnClick="func();function2();"

or,
pass any extra parameters to call another function associated with first invoked function.
eg:
OnClick="func(1)"

function func(){
 if(arguments[0]=='1')
   function2();
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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