View Single Post
  #1 (permalink)  
Old January 6th, 2009, 10:50 AM
ismailc ismailc is offline
Authorized User
Points: 383, Level: 6
Points: 383, Level: 6 Points: 383, Level: 6 Points: 383, Level: 6
Activity: 5%
Activity: 5% Activity: 5% Activity: 5%
 
Join Date: Jan 2007
Location: durban, Africa, South Africa.
Posts: 89
Thanks: 1
Thanked 0 Times in 0 Posts
Question Valid Javascript to get working in xslt

Hi,
I found this code that allows anly numeric char, the problem i have is that the xslt file does not like the script:

<SCRIPT TYPE='text/javascript'>
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>

Please Assist!
Reply With Quote