On Fri, 27 Feb 2004 01:16:17 +0000, highway of diamonds
<on*@oneandonly.com> wrote:
a bit of a 'hacker' with javascript but can any one tell me why this
code throws up "'exit' is undefined" and how to sort.
Because there is no such global variable, exit. There is no such global
function either. In fact, even if you use return, which can be used to
prematurely exit functions, it would serve no purpose as:
1) That code is not part of a function, and
2) The function would end after the 'else' clause anyway.
<script language="JavaScript">
The language attribute is deprecated. The type attribute is sufficient for
specifying the scripting language and, more importantly, it is required.
<script type="text/javascript">
if (navigator.appName == 'Microsoft Internet Explorer' &&
parseInt(navigator.appVersion) >= 4){
Browser detection is a bad idea. For instance, my browser, Opera 7.23,
will appear as IE according to that test if it is in spoofing mode.
Furthermore, this script appears to make your page dependent on support of
JavaScript that, depending on your execution environment, might not be
available.
However, without knowing what you're trying to acheive, there's no way to
suggest a better solution.
[snipped code]
Mike
--
Michael Winter
M.******@blueyonder.co.invalid (replace ".invalid" with ".uk" to reply)