Christine Jensen: IMG show und hide in Netscape

Hallo liebe Forem-Mitglieder!

Ich bin im Archiv auf einen Betrag von Thomas Mell (3.3.2000) gestoßen:

--Für beide Browser mußt du es also so schreiben:
onmouseover="if(document.all)document.all.divtext.style.visibility='visible';else document.divtext.visibility='show'" --

Das war genau das , was ich suchte, allerdings funktioniert es bei mir trotzdem nicht in Netscape, immerhin bekomme ich auch keine Fehlermeldung. Im IE ist natürlich wiedermal alles ok.
Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

#div1 {position:absolute; left:-35px; top:140px; width:145px; z-index:1;}
#div8 {position:absolute; left:94px; top:120px; width:55px; z-index:9; visibility:hidden;}

<div id="div1">
<a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
document.div8.visibility='hide'">
<img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

  1. Hallo Christine,

    Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

    <div id="div1">
    <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
    document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
    document.div8.visibility='hide'">
    <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

    ein (Flüchtigkeits)-Fehler:

    für NS bis 4.xx -- document.layers.div8.visibility='...'

    Gruss

    Uwe Nohl

    1. Hallo Christine,

      Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

      <div id="div1">
      <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
      document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
      document.div8.visibility='hide'">
      <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

      ein (Flüchtigkeits)-Fehler:

      für NS bis 4.xx -- document.layers.div8.visibility='...'

      Gruss

      Uwe Nohl

      1. Hallo Christine,

        Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

        <div id="div1">
        <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
        document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
        document.div8.visibility='hide'">
        <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

        ein (Flüchtigkeits)-Fehler:

        für NS bis 4.xx -- document.layers.div8.visibility='...'

        Gruss

        Uwe Nohl

        1. Hallo Christine,

          Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

          <div id="div1">
          <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
          document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
          document.div8.visibility='hide'">
          <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

          ein (Flüchtigkeits)-Fehler:

          für NS bis 4.xx -- document.layers.div8.visibility='...'

          Gruss

          Uwe Nohl

          1. Hallo Christine,

            Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

            <div id="div1">
            <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
            document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
            document.div8.visibility='hide'">
            <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

            ein (Flüchtigkeits)-Fehler:

            für NS bis 4.xx -- document.layers.div8.visibility='...'

            Gruss

            Uwe Nohl

            1. Hallo Christine,

              Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

              <div id="div1">
              <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
              document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
              document.div8.visibility='hide'">
              <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

              ein (Flüchtigkeits)-Fehler:

              für NS bis 4.xx -- document.layers.div8.visibility='...'

              Gruss

              Uwe Nohl

            2. Hallo Christine,

              Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

              <div id="div1">
              <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
              document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
              document.div8.visibility='hide'">
              <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

              ein (Flüchtigkeits)-Fehler:

              für NS bis 4.xx -- document.layers.div8.visibility='...'

              Gruss

              Uwe Nohl

              1. Hallo Christine,

                Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

                <div id="div1">
                <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
                document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
                document.div8.visibility='hide'">
                <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

                ein (Flüchtigkeits)-Fehler:

                für NS bis 4.xx -- document.layers.div8.visibility='...'

                Gruss

                Uwe Nohl

                1. Hallo Christine,

                  Was habe ich falsch gemacht, ein doofer Anfängerfehler!?

                  <div id="div1">
                  <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
                  document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
                  document.div8.visibility='hide'">
                  <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

                  ein (Flüchtigkeits)-Fehler:

                  für NS bis 4.xx -- document.layers.div8.visibility='...'

                  Gruss

                  Uwe Nohl

  2. Hallo Christine,

    das mit '.layers.' war nicht korrekt, sorry, es geht auch ohne in NS.

    Ich habe mir das in den head-teil eines Dokuments kopiert
    </style>

    #div1 {position:absolute; left:-35px; top:140px; width:145px; z-index:1;}
    #div8 {position:absolute; left:94px; top:120px; width:55px; z-index:9; visibility:hidden;}

    </style>

    das in den body-teil

    <div id="div1">
    <a href="index.htm" onmouseover="if(document.all)document.all.div8.style.visibility='visible';else
    document.div8.visibility='show'" onmouseout="if(document.all)document.all.div8.style.visibility='hidden';else
    document.div8.visibility='hide'">
    <img SRC="heat.gif" BORDER=0 height=30 width=145 name="heiz"></a></div>

    und div8 frei ergänzt. Klappt bei mir im NS 4.73 tadellos. Vielleicht ist bei Dir an der Dokumentstruktur etwas nicht richtig.

    Gruss
    Uwe Nohl