From what i understand, the default treatment for return false is:
However in my c
Like this:
<input type="submit" onclick="jsfunction();return false;" />
or just use a button intead of a submit button:
<input type="button" value="Submit" onclick="jsfunction();" />
try to add your method (jsmethod) to your form onsubmit handler like this
<form onsubmit="jsfunction(); return false;">
and remove the input onclick handler.
just do like this
<input type="submit" onclick="return jsfunction()" />
change in function
function jsfunction()
{
//you code
return false;
}
or just try if you dont want to change function
<input type="submit" onclick="jsfunction();return false;" />
No you cannot have 2 onclick
declarations but you can call multiple functions in the same onclick
like:
<input type="submit" onclick="jsfunction();anotherFunction();" />
And in the other function you can have:
function anotherFunction(){
return false;
}