Peter: Ist die Frage wirklich sooo doof...

Beitrag lesen

Gute Idee,

OK, hier ist ein Beispiel. Leider ist das Skript nicht ganz zuverlässig und - wie ich glaube - etwas zu kompliziert.
Das Problem tritt auf wenn man wieder auf eine alte Seite zurückkehrt. Dann läd der alte Button nicht sofort und es gibt diese häßlichen Lückenfüller.
Hier das Skript:

#####im Head:
Definition der Variablen etc.

function activeMenue() {
if( browserOk == 1 ) {
  var imgidx = activeMenue.arguments[0];
  if( currArea != imgidx && currIdx != imgidx ) {
   var theImg = document.images[ imgidx ];
   idxPassive = theImg.src;
   theImg.src = activeMenue.arguments[1];
   currIdx = imgidx;
  }
}
}

function passiveMenue() {
if( browserOk == 1 ) {
  var imgidx = passiveMenue.arguments[0];
  if( currArea != imgidx ) {
   var theImg = document.images[ imgidx ];
   theImg.src = passiveMenue.arguments[1];
   if( imgidx == currIdx ) {
    currIdx = -1;
    idxPassive = "";
   }
  }
}
}

function doMenue() {
if( browserOk == 1 ) {
  var imgidx = doMenue.arguments[0];
  if(currArea != imgidx && currArea >= 0)
   { var theImg = document.images[ currArea ];
   theImg.src = areaPassive; }
  if( currIdx != imgidx )
   {activeMenue( imgidx, doMenue.arguments[1] ); }
  areaPassive = idxPassive;
  currArea = imgidx;
}
}

und im Body:

<A HREF="URL.htm" TARGET="_blanc"

onMouseOver="activeMenue(1,'images/r_Bild.gif');
window.status='Dada'; return true"
onMouseOut="passiveMenue(1,'images/Bild.gif'); return true"
onClick="doMenue(1,'images/pug.gif');">
<IMG SRC="images/Bild.gif" WIDTH="180" HEIGHT="20" BORDER="0"></A><BR>

Würde mich freuen, wenn jemand eine bessere Lösung findet.

Gruß Peter