u can do during runtime .. not after giving the value in the text box.
i mean .. while u r typing some keycode then u can validate.
look at this sample code.
<input type = text onkeypress = validate()>
now the body of validate function is .... (IE specific)
function validate()
{
var point_pressed = event.srcElement.value.indexOf('.') ? true : false;
if((event.keyCode >=48 && event.keyCode <= 57) || (event.keyCode == 9 && !point_pressed))
//Check the point (.) keycode is 9 or anything else.
{
//allow the key_stroke .... (ie.....do nothing)
}
else event.keyCode = 0; //Block the key code.
}
i think u can arrange it.
so try it. ... it ll work.
kind regads.
dmjpro.