ptr: in einem Layer soll bei MouseOver ein neuer Text erscheinen

Beitrag lesen

Hallo Bernd,
habs nicht ausprobiert, aber so könnts gehen:

var namenspeicher;

var person_art=[ ['Amsterdam',7,8,9,10,11],['New York',12,7,9,6,0],['Oslo',7,9,8],['Munich',6,7,9,1],['Bad Neustadt',11,7,8,2,9],['Stadt',5,6,9,7,10],['Stadt',8,9,3],['Stadt',7,2,4,9,10],['Stadt',5,9,1,10,7],['Stadt',10,7,2,3,1],['Stadt',7,2,1]];

function clearAll() {

if(arguments.length>0){arguments[0].childNodes[0].childNodes[0].nodeValue=namenspeicher;}

for (x=0;x<=12;x++) { document.getElementById("art_"+x).style.color = "#666666";        }
  for (x=0;x<=10;x++) { document.getElementById("per_"+x).style.color = "#666666";        }
}

function changePerson(id) {
  for (x=0;x<=12;x++) { document.getElementById("art_"+x).style.color = "#666666";        }
  for (x=1;x<= person_art[id].length;x++) { document.getElementById("art_"+person_art[id][x]).style.color = "#007DC9"; }

document.getElementById("per_"+[id]).childNodes[0].nodeValue=person_art[id][0];

document.getElementById("per_"+[id]).style.color = "#007DC9";
}

<a href="photographers/huber.htm" onMouseOver="changePerson(0)" onMouseOut="clearAll(this)">
            <div class="photographers" id="per_0">Dieter Huber</div></a>

gruß
ptr