Assistance Javascript/Konqueror request
Dirk Mueller
mueller at kde.org
Wed May 15 13:41:46 BST 2002
On Mit, 15 Mai 2002, Roland Seuhs wrote:
> The menus work with IE, Mozilla and Netscape4 but not with Konqueror 3.0.
> Is this a problem of Konqueror or of faulty Javascript code?
It is the usual faulty JS code.
see www.flowerfish.org/hp/menu.js:
var
BV=parseFloat(navigator.appVersion.indexOf("MSIE")>0?navigator.appVersion.split(";")[1].substr(6):navigator.appVersion);
var BN=navigator.appName;
var IsWin=(navigator.userAgent.indexOf('Win')!=-1);
var IsMac=(navigator.userAgent.indexOf('Mac')!=-1);
var OP=(navigator.userAgent.indexOf('Opera')!=-1&&BV>=4)?true:false;
var NS=(BN.indexOf('Netscape')!=-1&&(BV>=4&&BV<5)&&!OP)?true:false;
var SM=(BN.indexOf('Netscape')!=-1&&(BV>=5)||OP)?true:false;
var IE=(BN.indexOf('Explorer')!=-1&&(BV>=4)||SM)?true:false;
Fix this code, and it will most likely work.
Dirk
More information about the kfm-devel
mailing list