Why does this script work with IE and not with Firefox ?

B

benfbox-google

Hi, there.

The following javascript is working perfectly with IE, but does not
work with Firefox (no error, but displays nothing).
Can somebody help ?
Thanks in advance,
Ben.


The script :

Xoffset=-60;
Yoffset=20;

var nav,old,iex=(document.all),yyy=-1000;
if(navigator.appName=="Netscape"){(document.layers)?nav=true:eek:ld=true;}

if(!old){
var skn=(nav)?document.dek:dek.style;
if(nav)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=get_mouse;
}

function show_popup(msg1,msg2){
var content="<TABLE WIDTH=150 BORDER=1 BORDERCOLOR=black CELLPADDING=2
CELLSPACING=0 BGCOLOR='#999999'><TD ALIGN=center><FONT COLOR=white
SIZE=3><I>"+msg1+"</I></FONT><BR><FONT COLOR=white
SIZE=2><I>"+msg2+"</I></FONT></TD></TABLE>";
if(old){alert(msg);return;}
else{yyy=Yoffset;

if(nav){skn.document.write(content);skn.document.close();skn.visibility="visible"}

if(iex){document.all("dek").innerHTML=content;skn.visibility="visible"}
}
}

function get_mouse(e){
var
x=(nav)?e.pageX:event.x+document.body.scrollLeft;skn.left=x+Xoffset;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;skn.top=y+yyy;
}

function kill_popup(){
if(!old){yyy=-1000;skn.visibility="hidden";}
}



and the calling Html :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html;CHARSET=iso-8859-1">
<TITLE>untitled</TITLE>
</HEAD>

<BODY BGCOLOR="#999999" LINK="#0000FF" VLINK="#0000FF" ALINK="#0000FF">
<SCRIPT LANGUAGE="javascript" src="../html/popup.js"></SCRIPT>

<BR><BR><P ALIGN="CENTER"><FONT SIZE="8" COLOR="#336666">Photos en
Couleurs</FONT></P><BR><BR>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" ALIGN="CENTER"
WIDTH="650">
<TR>
<TD ALIGN="CENTER"><A HREF="c_fleurs/c_fleurs.htm"><IMG
SRC="c_fleurs/01s.jpg" BORDER="0"
onMouseOver="show_popup('Fleurs','14.3.2005')";
onMouseOut="kill_popup()"></A></TD>
</TR>
</TABLE>
</BODY>
</HTML>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top