wcf.regNote.message
ich mal wieder.
Quoted
<tr>
<td style="width:24px; height:24px"></td>
<td style="width:24px; height:24px">a</td>
<td style="width:24px; height:24px">b</td>
<td style="width:24px; height:24px">c</td>
<td style="width:24px; height:24px">d</td>
<td style="width:24px; height:24px">e</td>
<td style="width:24px; height:24px">f</td>
<td style="width:24px; height:24px">g</td>
<td style="width:24px; height:24px">h</td>
<td style="width:24px; height:24px">i</td>
<td style="width:24px; height:24px">j</td>
<td style="width:24px; height:24px"></td>
<td style="width:24px; height:24px">1</td>
<td style="width:24px; height:24px">2</td>
<td style="width:24px; height:24px">3</td>
<td style="width:24px; height:24px">4</td>
<td style="width:24px; height:24px">5</td>
<td style="width:24px; height:24px">6</td>
<td style="width:24px; height:24px">7</td>
<td style="width:24px; height:24px">8</td>
<td style="width:24px; height:24px">9</td>
<td style="width:24px; height:24px">10</td>
<td style="width:24px; height:24px"></td>
</tr>
[/qoute]
Habe besagte Felder mal markiert mit a-j & 1-10. Das ganze dann 10x untereinander.
So, nun zu meinem kleinem Problem:
Ich möchte ein "onmouseover" und ein "onmouseout" in jedem <td> einbauen, um dann dieses und evt. mehrere Klassen zu ändern.
Bsp:
im Header ist:
<script type="text/javascript">
<!--
function showboat(a,b) {
if (a) document.getElementById("13").className="boatclass1";
if (b) document.getElementById("14").className="boatclass2";
}
//-->
</script>
und dies ein Auszug aus dem Template (ist nur ein test):
<td style="width:24px; height:24px" onmouseover="javascript:showboat(13,14);">a</td>
....
.....
<td style="width:24px; height:24px" id="13">h</td>
<td style="width:24px; height:24px" id="14">g</td>
Wenn ich also drüberfahre, sollen sich 2 andere ändern.
Aber irgendwie will das nicht so.
Vielleicht hat da jemand eine Idee zu.
Snoopy


Quoted
<style type="text/css">
<!--
.boat1classa1 { background-image: url(images/battleships/a-zwei1.gif); }
.boat1classa2 { background-image: url(images/battleships/a-zwei2.gif); }
.boat2classa1 { background-image: url(images/battleships/a-drei1.gif); }
.boat2classa2 { background-image: url(images/battleships/a-drei2.gif); }
.boat2classa3 { background-image: url(images/battleships/a-drei3.gif); }
.boat3classa1 { background-image: url(images/battleships/a-vier1.gif); }
.boat3classa2 { background-image: url(images/battleships/a-vier2.gif); }
.boat3classa3 { background-image: url(images/battleships/a-vier3.gif); }
.boat3classa4 { background-image: url(images/battleships/a-vier4.gif); }
.boat4classa1 { background-image: url(images/battleships/a-fuenf1.gif); }
.boat4classa2 { background-image: url(images/battleships/a-fuenf2.gif); }
.boat4classa3 { background-image: url(images/battleships/a-fuenf3.gif); }
.boat4classa4 { background-image: url(images/battleships/a-fuenf4.gif); }
.boat4classa5 { background-image: url(images/battleships/a-fuenf5.gif); }
.boat1classb1 { background-image: url(images/battleships/b-zwei1.gif); }
.boat1classb2 { background-image: url(images/battleships/b-zwei2.gif); }
.boat2classb1 { background-image: url(images/battleships/b-drei1.gif); }
.boat2classb2 { background-image: url(images/battleships/b-drei2.gif); }
.boat2classb3 { background-image: url(images/battleships/b-drei3.gif); }
.boat3classb1 { background-image: url(images/battleships/b-vier1.gif); }
.boat3classb2 { background-image: url(images/battleships/b-vier2.gif); }
.boat3classb3 { background-image: url(images/battleships/b-vier3.gif); }
.boat3classb4 { background-image: url(images/battleships/b-vier4.gif); }
.boat4classb1 { background-image: url(images/battleships/b-fuenf1.gif); }
.boat4classb2 { background-image: url(images/battleships/b-fuenf2.gif); }
.boat4classb3 { background-image: url(images/battleships/b-fuenf3.gif); }
.boat4classb4 { background-image: url(images/battleships/b-fuenf4.gif); }
.boat4classb5 { background-image: url(images/battleships/b-fuenf5.gif); }
.myback { background-image: url(images/battleships/boardalone.jpg); }
-->
</style>
<script type="text/javascript">
<!--
function showboat(x,z,a,b,c,d,e) {
var wh = "a";
if (z) var wh = "b";
var bclass = "boat"+x+"class"+wh;
if (a != 255) document.getElementById("l"+a).className=bclass+"1";
if (b != 255) document.getElementById("l"+b).className=bclass+"2";
if (c != 255) document.getElementById("l"+c).className=bclass+"3";
if (d != 255) document.getElementById("l"+d).className=bclass+"4";
if (e != 255) document.getElementById("l"+e).className=bclass+"5";
}
function clearboat(x,z,a,b,c,d,e) {
if (a != 255) document.getElementById("l"+a).className="";
if (b != 255) document.getElementById("l"+b).className="";
if (c != 255) document.getElementById("l"+c).className="";
if (d != 255) document.getElementById("l"+d).className="";
if (e != 255) document.getElementById("l"+e).className="";
}
function setboat(x,z,a,b,c,d,e) {
var url = "battleships_main.php?what=4&boat=";
url += x+"&where=";
url += z+"&a="+a+"&b="+b+"&c="+c+"&d="+d+"&e=";
url += e+"&sid=$session[hash]";
window.location = url;
}
//-->
</script>