Is it possible to do two things onClick

Example :

onclick=“function1, close.window()”

TY

I don’t know if you can reference a function like that - without the “()” - but you can call as many functions as you want with an event. Just seperate them with commas or semi-colons.

Create a new function.
In it place two or more functions you wish to run, in the order you wish them to run.
Make the new function the one that executes on the click.

onclick=“function1(); function2(); function3();”

Think of it the same way you would this:

function onclick()
{
function1(); // Execute the first function
function2(); // Execute the second
function3();
}

// If this is function2, then function3 is never executed.
// * You can use return false to stop a function from completing execution.
function function2()
{
if(true)
{
return false;
}
}