Hi all,
Here i have pasted my floting div javascript which is working fine in IE but it's not working in Firefox browser. Please help me out check this code and let me know why is this not working in Firefox.
while it would floting in firefox it should be fixed position right side in the table itself.
PLZ HELP ME SOONNNNNNNNNNNNNN
Thanks
Raj
<SCRIPT language="JavaScript" type="text/javascript">
// ----------------------------------------
// Detectind user browser
// ----------------------------------------
var Nav = navigator, Ag = Nav.userAgent;
var bIE = (Ag.indexOf('MSIE') >= 0), bMacIE = false;
var bNC = (navigator.appName == "Netscape");
var bOpera = (Ag.indexOf('Opera') >= 0);
var nVer = 0, sTmp = "";
if (bIE) {
sTmp = Ag.substring(Ag.indexOf("MSIE") + 5, Ag.length);
nVer = Math.floor (sTmp.substring(0, sTmp.indexOf(";")));
if (nVer >= 4 && !document.all)
nVer = 0;
if (Ag.indexOf("Mac") >= 0)
bMacIE = true;
}
if (bNC)
nVer = Math.floor (Nav.appVersion.substring (0, Nav.appVersion.indexOf (" ") ) );
bDynamic = (document.all || document.layers) ? true : false;
// ----------------------------------------
// Menu moving functions
// ----------------------------------------
nMenuYPos = 97;
nYDelta = 0;
nPrevScrollPos = 0;
function Spy () {
if (bNC && nVer >= 4) {
if (window.pageYOffset < nMenuYPos - nYDelta)
nNeededPos = nMenuYPos;
else
nNeededPos = window.pageYOffset + nYDelta;
nCurrentPos = document.layers["floatingmenu"].top;
if (nNeededPos == nCurrentPos)
return;
nCurrentPos += Math.round ( (nNeededPos - nCurrentPos) / 4);
document.layers["floatingmenu"].top = nCurrentPos;
}
if (bIE && nVer >= 4 && !bMacIE) {
if (document.body.scrollTop < nMenuYPos - nYDelta)
nNeededPos = nMenuYPos;
else
nNeededPos = document.body.scrollTop + nYDelta;
nCurrentPos = document.all["floatingmenu"].offsetTop;
if (nNeededPos == nCurrentPos)
return;
nDelta = (nNeededPos - nCurrentPos) / 6;
if (nDelta > 0 && nDelta < 0.5)
nCurrentPos += nNeededPos - nCurrentPos;
else
if (nDelta < 0 && nDelta >= -0.5)
nCurrentPos --;
else
nCurrentPos += Math.round (nDelta);
pnt = document.all ["floatingmenu"].style;
pnt.top = nCurrentPos;
}
}
function ScriptStart () {
if (bNC && nVer >= 4)
setInterval ("Spy ()", 10);
if (bIE && nVer >= 4 && !bMacIE)
setInterval("Spy ()", 10);
}
bScriptLoaded = true;
</SCRIPT>
<body onload="ScriptStart ();">



