Javascript question

Associate
Joined
29 Jun 2004
Posts
2,282
Location
Rainham, Kent
Can anyone tell me how to run two functions from a single button click ? I've currently got one function running from a button onclick, but now I need another one as well to show how many times the button has been clicked. Sorry if it's dead simple, I'm very new to this...
 
Code:
... onClick="firstFunction(); secondFunction();" ...

or perhaps

Code:
... onClick="twoFunctions()" ...
 
function twoFunctions()
{
    firstFunction();
    secondFunction();
}
 
Last edited:
Back
Top Bottom