473,327 Members | 2,074 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,327 software developers and data experts.

Why doesn't this work in Mozilla?

Working file at:
http://www.elma.hr/test.php
code of menu system at:
http://www.elma.hr/test_code.htm
in mozilla drop down menus are not shown... but in IE everything works
fine...

Anybody knows why?
Please don't comment the code (i am aware that it a mess)(the same
thing written over and over again) I am trying to make it vork
everywhere and then to clean up the code...
Thanks
Nov 2 '05 #1
1 1429


Feudalac! wrote:
Working file at:
http://www.elma.hr/test.php in mozilla drop down menus are not shown... but in IE everything works
fine...

Anybody knows why?


Yes, Mozilla's JavaScript console tells you

Error: window.event has no properties
Source File: http://www.elma.hr/test.php
Line: 33

even gives you a clickable link there that leads you directly to the
source viewer displaying the line causing that error:

function pop(me,menu) {
document.getElementById(menu).left=window.event.cl ientX

You need to pass the event object to the function e.g. change

<td width=125 id=prvim onMouseOver="javascript:pop('prvim','prvi')"

to

<td width=125 id=prvim
onmouseover="pop('prvim','prvi', event)"

and add a parameter to the function e.g.
function pop (me, menu, evt) {
then you can use e.g.
evt.clientX
in the function. The properties of the event object for mouse events are
described here:
<http://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-MouseEvent>

You will have other issues however, innerText is not supported by Mozilla.

You might want to look at documents like
<http://developer.mozilla.org/en/docs/Migrate_apps_from_Internet_Explorer_to_Mozilla>
if you are serious about developing cross browser stuff.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Nov 2 '05 #2

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

Similar topics

1
by: Thomas | last post by:
It looks like the String.replace doesn't work in IE6.1. Anyone else has the same problem. I am using newest service package of IE and Win2K. Thanks
2
by: kelvin | last post by:
Hi, I've this piece of code which does not work at all. Can anyone point out my mistake? I've 2 buttons. History button will call verifyFields() function and lead to different page for...
7
by: Bennett Haselton | last post by:
Is there any way to find a string representing an object's class, which will work in Internet Explorer 6? "typeof" doesn't work -- it returns "object" for all objects: x =...
3
by: Iver Erling Årva | last post by:
Can anyone please tell me why this doesn't work? The sign changes when I hit the button, and I get no error messages, but the textarea doesn't disappear/reappear. <html> <head> <title>New...
3
by: Matt | last post by:
I want to know if readOnly attribute doesn't work for drop down list? If I try disabled attribute, it works fine for drop down list. When I try text box, it works fine for both disabled and...
1
by: kj | last post by:
I don't know what I'm doing wrong. I have a file called user.js in my Mozilla (or Firefox) directory, and this file contains the following code: user_pref("browser.throbber.url",...
9
by: lkrubner | last post by:
I've got a function, you can see it below, that is being called onmouseup in the textarea on my main form. The idea is to find a selection if possible and store that text in a global variable. I...
4
by: Joe | last post by:
Hello, I have created a login page using dotnet. I am using requiredFieldValidator and noticed that the code works fine in IE but not in Netscape, Opera, Mozilla, Firefox, etc. For example...
12
tpgames
by: tpgames | last post by:
If the error message says Bad key or directory name: "/apps/gnome-alsamixer/display_sliders/SigmaTel_STAC9708,11-Master": `,' is an invalid character in key/directory names What do all do you...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...

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.