Hi, Thank You.
I have dev tool that uses asp + xslt page.
On the dev tool I have objects, text box with poperties & events i can use.
The problem i have is that I only want a numeric value in a textbox of datatype text. Don't want to change it to numeric as it rounds/trims the value when wanting to do a calulcation.
So in the xslt file i want to add a javascript function that i can use on the onkeyevent of the textbox not to allow numeric characters.
Still struggling though!
The function between the <![CDATA[ is like it is filtered out (font light grey) and can't use the function.
<SCRIPT TYPE='text/javascript'>
<![CDATA[
function IsNumeric(sText)
{
var ValidChars = "0123456789.";
var IsNumber=true;
var Char;
for (i = 0; i < sText.length && IsNumber == true; i++)
{
Char = sText.charAt(i);
if (ValidChars.indexOf(Char) == -1)
{
IsNumber = false;
}
}
return IsNumber;
}
]]>
</SCRIPT>
|