Web Analytics Made Easy -
StatCounter OnMouseOver / OnMouseout effects do not work in Netscape - CodingForum

Announcement

Collapse
No announcement yet.

OnMouseOver / OnMouseout effects do not work in Netscape

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • OnMouseOver / OnMouseout effects do not work in Netscape

    Hi

    This function allows text to be written on another part of the screen, when the mouse is moved over the imagemap. This is at http://homepages.ihug.co.nz/~usateden/panacea/entry.htm It works well in Internet Explorer, but not in Netscape. Is there a possibility of modifying the function, so that it can work in both browsers.

    <script>
    function overout(divname,content) {
    document.getElementById(divname).innerHTML = content;
    }
    </script>
    </head>

    <table border="0" cellpadding="0" width="90%" cellspacing="0">
    <tr>
    <td width="25%" valign="bottom"><a href="artistofmonth.htm"><img src="first.GIF"
    onmouseover="overout('side','Find out who is the Panacea Artist of the Month')" ;
    onmouseout="overout('side','')" ; border="0" width="227" height="138"></a></td>
    <td width="25%" valign="bottom"><img src="second.GIF"
    onmouseover="overout('side','Come in and see the Panacea Art Gallery')" ;
    onmouseout="overout('side','')" ; width="183" height="138"></td>
    <td width="25%" valign="top"></td>
    </tr>
    <tr>
    <td><div id="side" style="width:700px; height:700px; font:14pt;"></div></td>
    </tr>


    bye
    Allyson

  • #2
    The <DIV> tag works fine with IE and NS6. For NS4 you will have to use layers....

    to write to a NS4 layer :
    <script language="JavaScript">
    function ns4Write()
    {
    document.layerName.document.write('......');
    document.layerName.document.close();
    }
    </script>

    <layer id="layerName">.........</layer>

    Check out a related script at
    Latest news coverage, email, free stock quotes, live scores and video are just the beginning. Discover more every day at Yahoo!


    Scripting | JavaScripts | PerlScripts | Python Scripts | Articles | My Journal

    Comment


    • #3
      <html>
      <head>
      <title>Panacea Art</title>
      <base href="http://homepages.ihug.co.nz/~usateden/panacea/">
      <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
      <style type="text/css">

      .mouseText {
      font: 200 20px "comic sans ms";
      color: sienna;
      }
      .logo {
      font-weight: bold;
      color: crimson;
      }

      </style>
      <script type="text/javascript" language="javascript">

      var MO_text = new Array();
      MO_text[1] = 'Find out who is the <span class="logo">Panacea</span> Artist of the Month';
      MO_text[2] ='Come in and see the <span class="logo">Panacea</span> Art Gallery';
      MO_text[3] = 'Find out about the <span class="logo">Panacea</span> Arts Trust';

      function getCell(id) {
      return document.all ? document.all(id) :
      document.getElementById ? document.getElementById(id) :
      document.layers ? document['NS' + id].document.layers[0] : null;
      }

      function setCell(id, content, classname) {
      var c = getCell(id);
      if (!document.layers) {
      c.innerHTML = content;
      if (classname) c.className = classname;
      } else {
      var sSPAN = ((classname) ? '<span class="' + classname + '">' : '<span>');
      c.document.write(sSPAN + content + '</span>');
      c.document.close();
      c.parentLayer.clip.width = c.clip.width;
      c.parentLayer.clip.height = c.clip.height;
      }
      }

      </script>
      <body background="images/bg1.jpg">
      <p align="center"><img src="images/titlelogo.GIF" width="220" height="54"></p>
      <p>&nbsp;</p>
      <div align="center">
      <table border="0" cellspacing="0" cellpadding="0">
      <tr>
      <td width="227" valign="bottom"><a href="artistofmonth.htm" target="_top"
      onmouseover="setCell('textcell',MO_text[1],'mousetext')"
      onmouseout="setCell('textcell','')" ;>
      <img src="first.GIF" border="0" width="227" height="138"></a></td>
      <td width="183" valign="bottom" colspan="2"><a href="#" target="_top"
      onmouseover="setCell('textcell',MO_text[2],'mousetext')"
      onmouseout="setCell('textcell','')">
      <img src="second.GIF" width="183" height="138" border="0"></a></td>
      </tr><tr>
      <td width="227" valign="top">
      <a href="frameset/index.html" target="_top"
      onmouseover="setCell('textcell',MO_text[3],'mousetext')"
      onmouseout="setCell('textcell','')">
      <img src="third.GIF" width="227" height="168" border="0"></a></td>
      <td width="180" valign="top"><img src="fourth.GIF" width="180" height="167"></td>
      <td id="textcell" width="410" valign="top"><ilayer id="NStextcell"><layer></layer></ilayer>
      </td>
      </tr>
      </table>
      </div>
      </body>
      </html>

      Comment

      Working...
      X