f



show on mouseover

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>



-- 
:.  http://www.raf256.com/from-news  .: ~~~~~~~l-.~~~~~~\ SSN 688
:.:.  Rafal (at) Raf256 (dot) com  .:.:    ____| ]____,  '--------
:.  :.      Rafal 'Raf256' Maj   .:  .: :-(     *      ) .   . _ 
:.:.:.:.        GG - 1175498   .:.:.:.:   ,"----------"  
0
Rafal
6/26/2003 3:45:41 PM
comp.lang.javascript 38370 articles. 2 followers. javascript4 (1315) is leader. Post Follow

1 Replies
1043 Views

Similar Articles

[PageSpeed] 31

"Rafal 'Raf256' Maj" <spam@raf256.com> writes:

> 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
-- 
Lasse Reichstein Nielsen  -  lrn@hotpop.com
 Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
  'Faith without judgement merely degrades the spirit divine.'
0
Lasse
6/27/2003 10:31:07 AM
Reply: