I've had a javascript running for quite som time and I've never experienced any problems in IE or in earlier version of firefox. In Firefox 5.0 however, if fails.
Note! The formula has been removed to simplify the example, as I've confirmed that the formula is working and producing the expected result.
<script type="text/javascript">
function NaN(Num) {
return (isNaN(Num) || Num == Infinity || Num == -Infinity ? "n/a" : Num);
}
function CalculateFormula() {
result = NaN(*formula*);
}
</script>
When the NaN function is to be called the javascript just exit. It works like a charm in IE, but to support FireFox 5.0 I've removed the NaN function from the result.
function CalculateFormula() {
result = *formula*;
}
I've also tried this, but it also will exit from the script when calling the NaN function. But this confirmed that my formula returned a number as expected.
function CalculateFormula() {
result = *formula*;
result = NaN(result);
}
Anyone who can shed some light on this issue?