show on mouseover

R

Rafal 'Raf256' Maj

Hi,
this code works only in Mozilla (not in IE) - what is the correct,
uniwersal version of it ?

<div
onmouseover='getElementById("aaa").style.visibility="visible;"';
onmouseout='getElementById("aaa").style.visibility="hidden;"';
test</div>

<div name="aaa">HIDDEN</div>
 
L

Lasse Reichstein Nielsen

Rafal 'Raf256' Maj said:
this code works only in Mozilla (not in IE) - what is the correct,
uniwersal version of it ?

onmouseover='document.getElementById("aaa").style.visibility="visible;"';
onmouseout='document.getElementById("aaa").style.visibility="hidden;"';
^^^^^^^^^

The function "getElementById" is a method of the document element, and
doesn't have to exist anywhere else.

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top