Page 1 of 1

function call on click event

Posted: Sun Feb 22, 2009 12:34 pm
by dheeraj
hello guys, i m in confusion that can we call more than one function on a single event, example is below...

Code: Select all

<input type="button" name="b1" value="Enter" onclick="return function1();return function2()">

Re: function call on click event

Posted: Sun Feb 22, 2009 3:05 pm
by VladSun
dheeraj wrote:hello guys, i m in confusion that can we call more than one function on a single event, example is below...

Code: Select all

<input type="button" name="b1" value="Enter" onclick="return function1();return function2()">
I think you want this:

Code: Select all

<input type="button" name="b1" value="Enter" onclick="return function1() && function2()">