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/