<script type="text/javascript">
function DecimalNumbers(evt)
{
var e = event || evt; // for trans-browser compatibility
var charCode = e.which || e.keyCode;
var dot;
if (charCode == 46)
{
// Allow only 1 decimal point ('.')...
if ((evt.value) && (evt.value.indexOf('.') >= 0))
return false;
else
return true;
}
else if (charCode > 31 && (charCode < 48 || charCode > 57))
{
return false;
}
}
function AlertLooseChanges()
{
if (confirm('Any changes made will not be saved to database.'))
{
return true;
}
else
{
return false;
}
}
</Script>
function DecimalNumbers(evt)
{
var e = event || evt; // for trans-browser compatibility
var charCode = e.which || e.keyCode;
var dot;
if (charCode == 46)
{
// Allow only 1 decimal point ('.')...
if ((evt.value) && (evt.value.indexOf('.') >= 0))
return false;
else
return true;
}
else if (charCode > 31 && (charCode < 48 || charCode > 57))
{
return false;
}
}
function AlertLooseChanges()
{
if (confirm('Any changes made will not be saved to database.'))
{
return true;
}
else
{
return false;
}
}
</Script>
No comments:
Post a Comment