Ok, I understand the debate where some people don't want javascript at all as part of Twiki. Fine. But for those of us who do want to use it, it would make things A LOT easier if TWiki would simply not recognize TWiki words between <
SCRIPT> tags.
For example, I wanted to check to see if a value was an integer. In Javascript, if it isn't, it returns NaN. So I couldn't do...
var numberCheck = parseInt(this.myForm.ChapterIn.value);
if (numberCheck == 'NaN')
{ alert("Enter a valid chapter");
return;
}
at all. I had to totally hack it by doing this...
var numberCheck = parseInt(this.myForm.ChapterIn.value);
numberCheck += 'x';
if (numberCheck == 'NaNx')
{ alert("Enter a valid chapter");
return;
}
Then I had even more fun trying to do a loop...
for (i = 0; i < 10; i++)
{ ...
}
...because TWiki tries to be nice and convert the '<' into a >
Again, all these problems go away if we just ignore all TWiki in between script tags!
--
MattWalsh - 20 Dec 2001
We have a similar issue with <verbatim> tags. I wrote a fix for that, perhaps this could be generalised for a range of tags that can be specified via a preference.
--
JohnTalintyre - 20 Dec 2001