473,378 Members | 1,209 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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


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:old=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.c lose();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;s kn.left=x+Xoffset;
var y=(nav)?e.pageY:event.y+document.body.scrollTop;sk n.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>

Jul 23 '05 #1
2 1769
be************@yahoo.fr wrote:
The following javascript is working perfectly with IE, but does not
work with Firefox

iex=(document.all)
if(navigator.appName=="Netscape"){(document.layers )


http://www.mozilla.org/docs/web-deve...ade_2.html#dom

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #2

OK, thanks !

Ben.

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Vincent van Beveren | last post by:
I have the following (seemingly) useless piece of JavaScript <html> <head> <script type="text/javascript"> function frameMe() { s = "document.open();"; s +=...
12
by: DEN | last post by:
Hello, I need to remove toolbar and menubar from my current window (not opened with window.open, it would be too easy!!!). I've tried to use the window.toolbar.visible=false property, but it has...
2
by: ranger7419 | last post by:
I'm trying to figure out why this script will work in IE 6 but not Firefox, and so I need someone here with a far better grasp on javascript to explain this. Basically, I have a page with several...
15
by: Lennart | last post by:
Hi folks, I have created an animated image gallery in dhtml. It works fine in Internet Explorer. In Firefox, it only works if I ommit the DOCTYPE tag. The page is valid xhtml-strict but with a...
7
by: Papelotte | last post by:
Hi all, I'm new to this forum and I am hoping that there is someone here who can help me. I have an ASP page that has javascript that works perfectly in IE, but not in Firefox. Can anybody tell...
8
by: hyejin | last post by:
I have a problem with dynamic iframe and document.close() on Firefox. Below two files create a dynamic iframe by JavaScript. These two samples do not have any problems on IE. But, on Firefox, the...
17
by: StevePBurgess | last post by:
A really simple script is driving me up the wall. I have a very simply facility on a website to allow the user to reorder items in a database table as she wishes by clicking a link that (in this...
4
by: aramsey | last post by:
I have a javascript program that works fine under Firefox and on IE when running XP, but is having a problem with IE running under Windows 2000 Pro. On my personal XP development machine I have...
12
by: InvalidLastName | last post by:
We have been used XslTransform. .NET 1.1, for transform XML document, Dataset with xsl to HTML. Some of these html contents contain javascript and links. For example: // javascript if (a &gt; b)...
1
by: tinnews | last post by:
I'm running a python script via the apache ExtFilterDefine directive, it works basically as expected *except* that when I change the script apache/firefox continue to run the old version of the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.