if (document.de.your_textbox_id.value != "")
{
var checkOK = "0123456789";
var checkStr = document.de.your_textbox_id.value;
var allValid = true;
for (i = 0; i < checkStr.length; i++)
{
ch = checkStr.charAt(i);
for (j = 0; j < checkOK.length; j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
}
if (!allValid)
{
alert("Please enter only numeric characters in the text box.");
document.de.your_textbox_id.focus();
}
}