I use the following code for checking whether an input is a number or not and if it is not a number the textbox does not accept the input

<input type="text" id="..." onKeypress="jvascript:checknumber(...);" />

it works fine.

But if I write the same code for checking the same when the input is getting pasted it fails:

i.e.,
<input type="text" id="..." onPaste="jvascript:checknumber(...);" onDrop="jvascript:checknumber(...);" />

or

<input type="text" id="..." onPaste="jvascript:return checknumber(...);" onDrop="jvascript:return checknumber(...);" />

the above code does not work.
But the following code works fine

<input type="text" id="..." onPaste="return false;" onDrop="return false;" />

Does anyone have any idea what I should do ?