Is it possible to have two function calls in a onclick? I tried doing something like:
onclick="function1(); function2();"
Doing that it only executes the first function, but not the second. Anyway to have both in the onclick? It code be on the client side or in the code behind in C#.
Thanks!
I’d say either
function1orfunction2is undefined, orfunction1is throwing an exception, or (with respect) you’re simply wrong that both of them don’t get called. In the normal case, both will be called (proof).That’s not to say it’s a good idea. You’d be much better off defining a third function that calls the other two, or even better using DOM2 handlers and doing away with
onclickentirely.