Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Javascript gurus
From: John Kershaw
Date: Sat, 3 Apr 1999 04:28:12 +0100

Hi All,

I have a Flash navigation bar on my site at http://www.whatgolf.com, inside
a frame.

It worked fine with the default settings until someone looked at it with
Windows98, then they got the alternate imagemap.

Using information from this list, I edited this code (adding the
navigator.userAgent.indexOf("windows 98") section):

if (navigator.mimeTypes &&
navigator.mimeTypes["application/x-shockwave-flash"] &&
navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
if (navigator.plugins && navigator.plugins["Shockwave Flash"])
ShockMode = 1;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.userAgent.indexOf("Windows 95")>=0 ||
navigator.userAgent.indexOf("windows 98") ||
navigator.userAgent.indexOf("Windows NT")>=0)) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');

and the problem went away.

But then I've installed Explorer 4.5 (Mac) and now it gives a JScript
compilation error:

Line: 15
Char: 17
Error: Unterminated string constant

So I looked at the code and (though I haven't the faintest about
Javascript) noticed that the other parts had >=0 at the end, so added that:

else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.userAgent.indexOf("Windows 95")>=0 ||
navigator.userAgent.indexOf("windows 98")>=0 ||
navigator.userAgent.indexOf("Windows NT")>=0)) {
document.write('<SCRIPT LANGUAGE=VBScript\> \n');

But it still gives the same error, so I've put it back as it was.

By the way, character 17 of line 15 is the 'i' in document.write of the
last line above...


Any Javascript gurus help me out?

John.


---------------------------------------
Where would we be without prepositions?
---------------------------------------
icq: 5195087
email: johnkershawatemail [dot] com (mailto:johnkershawatemail [dot] com)
web: http://www.thecafe.co.uk/kershaw/



------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  FLASH: margins, dante

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]