What you need to do is to check the whole contents of the textbox and scan for the decimal. if decimal is found then return false for it. also make sure it is done in onkeypress event and not any other event.
here is some sample code. populate the value variable with your controls value and you are good to go.
for(var s=0; s<value.length; ++s)
{
if(value.charCodeAt(s) == '.'.charCodeAt(0))
{
return false;
}
}