473,666 Members | 2,412 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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=(do cument.all),yyy =-1000;
if(navigator.ap pName=="Netscap e"){(document.l ayers)?nav=true :old=true;}

if(!old){
var skn=(nav)?docum ent.dek:dek.sty le;
if(nav)document .captureEvents( Event.MOUSEMOVE );
document.onmous emove=get_mouse ;
}

function show_popup(msg1 ,msg2){
var content="<TABLE WIDTH=150 BORDER=1 BORDERCOLOR=bla ck CELLPADDING=2
CELLSPACING=0 BGCOLOR='#99999 9'><TD ALIGN=center><F ONT COLOR=white
SIZE=3><I>"+msg 1+"</I></FONT><BR><FONT COLOR=white
SIZE=2><I>"+msg 2+"</I></FONT></TD></TABLE>";
if(old){alert(m sg);return;}
else{yyy=Yoffse t;

if(nav){skn.doc ument.write(con tent);skn.docum ent.close();skn .visibility="vi sible"}

if(iex){documen t.all("dek").in nerHTML=content ;skn.visibility ="visible"}
}
}

function get_mouse(e){
var
x=(nav)?e.pageX :event.x+docume nt.body.scrollL eft;skn.left=x+ Xoffset;
var y=(nav)?e.pageY :event.y+docume nt.body.scrollT op;skn.top=y+yy y;
}

function kill_popup(){
if(!old){yyy=-1000;skn.visibi lity="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=is o-8859-1">
<TITLE>untitled </TITLE>
</HEAD>

<BODY BGCOLOR="#99999 9" LINK="#0000FF" VLINK="#0000FF" ALINK="#0000FF" >
<SCRIPT LANGUAGE="javas cript" 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="sh ow_popup('Fleur s','14.3.2005') ";
onMouseOut="kil l_popup()"></A></TD>
</TR>
</TABLE>
</BODY>
</HTML>

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

iex=(document.a ll)
if(navigator.ap pName=="Netscap e"){(document.l ayers)


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
1472
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 += "document.writeln('<html><frameset rows=\"*,33%\">');\n"; s += "document.writeln('<frame src=\"' + document.location +
12
2654
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 no effect. No error message in the javascript console, nor any effect on the current window. I've tried Firefox and IE, same effect.... What should I do
2
3557
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 thumbnails. Above these thumbnails I placed a large picture with text next to it to describe what the picture is about. So, when you click a thumb, the large pic AND text change dynamically to reflect the thumbnail -- see...
15
5395
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 xhtml1-strict DOCTYPE, I get a dead script and dozens of error messages like "Error in parsing value in property 'width'. Declaration dropped." on Line 0. This page doesn't work in Firefox but is valid xhtml:...
7
8923
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 me how to get it to work in FF. I can insert a browser identifier and redirect if the script has to change for FF only. Basically, when a vistor goes to the page they are asked to click on images to chose the top 3 that they like - the images...
8
5359
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 icon on the top corner keeps running with "loading" message on the bottom status bar even though the browser completed everything in the iFrame. The line that causes the problem is "document.close()" in the included JS file. If this line is...
17
4233
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 case) says "MOVE UP" and links to the script below. This script snippet that does all the work is shown - the database connection is established and after doing its work the script returns the user to the referring page.
4
5934
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 the Microsoft Script Editor and I can set a breakpoint, step through code, inspect variables, etc... with no problem. On a machine where I am trying to debug this problem I am running Windows 2000 Pro with IE 6. I installed the Microsoft...
12
10095
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) ..... // xsl contents abc.aspx?p1=v1&amp;p2=<xsl:value-of select="$v2" />
1
2385
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 python script until I remove the script completely and then replace it. I.e. my script is called tl2html.py, if I change it to (say) add several lines of output the added lines don't appear on firefox. I can restart firefox and I can restart...
0
8440
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8352
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8863
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7378
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6189
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2765
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2005
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1763
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.