Über das erste Frame kann ich die Hintergrundfarbe einer bestimmten Tabellenzelle im 2. Frame verändern ("highlight"). Das klappt mit beigefügtem Code schon sehr gut. Jetzt soll aber gleichzeitig auch die angewählte Zelle an oberste Stelle des 2. Framefensters rutschen. Wer weiss wie es geht?
//Frame1:
<html>
<head></head>
<body bgcolor="#cccccc" text="#000000">
<center>
<p><b>Die Links:</b></p>
<a href='unten.html?person1' target="unten">Person1 Contact Link</a><br><br>
<a href='unten.html?person2' target="unten">Person2 Contact Link</a><br><br>
<a href='unten.html?person3' target="unten">Person3 Contact Link</a><br> <br>
</center></body>
</html>
//Frame2:
<html>
<head></head>
<body>
<SCRIPT LANGUAGE="JavaScript">
string = "" + location.search;
string = string.substring(1,string.length);
person1 = string.indexOf("person1"); // unique person1 string
person2 = string.indexOf("person2"); // unique person2 string
person3 = string.indexOf("person3"); // unique person3 string
if (location.search) {
text = "<center><table border=0 cellpadding=4 cellspacing=0>\n";
text += "<tr><td colspan=2 align=center><b>Contact Us!</b></td></tr>\n";
text += "<tr><td";
text += (person1>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person1
text += "Person 1: </td>\n";
text += "<td align=center";
text += (person1>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person1
text += "<a href='mailto:person1@site.com'><b>person1@site.com</b></a></td>\n";
text += "</tr>";
text += "<tr><td";
text += (person2>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person2
text += "Person 2: </td>\n";
text += "<td align=center";
text += (person2>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person2
text += "<a href='mailto:person2@site.com'><b>person2@site.com</b></a></td>\n";
text += "</tr>";
text += "<tr><td";
text += (person3>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person3
text += "Person 3: </td>\n";
text += "<td align=center";
text += (person3>-1 ? " bgcolor=yellow>" : ">"); // highlights cell if location has ?person3
text += "<a name='person3' href='#person3'></a>\n";
text += "<a href='mailto:person3@site.com'><b>person3@site.com</b></a></td>\n";
text += "</tr>";
text += "</table>";
text += "<br><font face='arial, helvetica' size=-2>[ Frame 2: <i>unten.html</i> ]</font></center>";
document.write(text);
}
else {
document.write("<center><table border=0 cellpadding=4 cellspacing=0>\n");
document.write("<tr><td colspan=2 align=center><b>Contact Us!</b></td></tr>\n");
document.write("<tr><td>Person 1: </td>\n");
document.write("<td><a
href='mailto:person1@site.com'><b>person1@site.com</b></a></td></tr>\n");
document.write("<tr><td>Person 2: </td>\n");
document.write("<td><a
href='mailto:person2@site.com'><b>person2@site.com</b></a></td></tr>\n");
document.write("<tr><td>Person 3: </td>\n");
document.write("<td><a
href='mailto:person3@site.com'><b>person3@site.com</b></a></td></tr>\n");
document.write("</table>\n");
document.write("<br><font face='arial, helvetica' size=-2>[ Frame 2: <i>unten.html</i>
]</font></center>");
}
</script>
</body>
</html>