I am trying to call two javascript functions on single events. Here is my function calling code.
<input type="text" name="cbh" id="c8" value="0" onkeypress="return isNumberKey(event);calculate();" />
First function to allow numbers only and it have following work flow.
function isNumberKey(evt)
{
var charCode = (evt.which) ? evt.which : event.keyCode
if (charCode > 31 && (charCode < 48 || charCode > 57))
return false;
return true;
}
For debugging purpose, sencond function has just one line.
function calculate()
{
alert("ok");
}
Now, first function is being called 100% ok. But second function does not seem being called. Any suggestions?
Edit: I want to call second function after execution of first function.