Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Netscape 6 Events

Status
Not open for further replies.

robulator

Programmer
Nov 17, 2000
33
US
I'm using Netscape 6.1 and it seems that the onMouseOver and onMouseOut events for a <SPAN> tag don't fire. Does anyone have any insite into this?

Thanks, Rob
 
Insight: Netscape = Garbage. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
set up your events using the methods they provide and it should work. try setting them up like this...


<!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0 Transitional//EN&quot;>

<html>
<head>
<title>Untitled</title>
<script>
function init() {
document.getElementById(&quot;spanID&quot;).addEventListener(&quot;mouseout&quot;, someFunction, true);
document.getElementById(&quot;spanID&quot;).addEventListener(&quot;mouseover&quot;, someFunction, true);
}
function someFunction() {
alert(&quot;hello world&quot;)
}
</script>
</head>

<body onload=&quot;init()&quot;>
<span id=&quot;spanID&quot;>this is a test</span>


</body>
</html>

 
Thanks. I'll try it. But what if you need to pass parameters to the event handler?
 
one thing i've noticed:

if you wanna event handlers to work for you, specify the position style property of an element

i mean:

<span id=&quot;test&quot; style=&quot;position:absolute;&quot; onmouseover=&quot;alert('hey, you\'ve just (mouse)overed me!!' )&quot;></span>

would work (at least it works for me in nn6 win98) Victor
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top