show on mouseover

Discussion in 'Javascript' started by Rafal 'Raf256' Maj, Jun 26, 2003.

  1. 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;"';
    <div name="aaa">HIDDEN</div>
     
    Rafal 'Raf256' Maj, Jun 26, 2003
    #1
    1. Advertisements

  2. 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, Jun 27, 2003
    #2
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.