Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Auckland, New Zealand
    Posts
    60
    Thanks
    0
    Thanked 0 Times in 0 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
    Regular Coder
    Join Date
    Jun 2002
    Location
    Mumbai, India
    Posts
    218
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs up

    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
    http://www.geocities.com/e_i_search/...-content20.htm


  • #3
    Senior Coder
    Join Date
    Jun 2002
    Posts
    1,404
    Thanks
    2
    Thanked 32 Times in 32 Posts
    <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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •