Ich habe das nun so gemacht nur weiß ich nicht was oder wie ich nun merke_dir function mouseoutColor übergeben soll. Ich weiß schon wie ich Paramter in funktionen übergebe aber in dem Fall komme ich nicht dahinter?
[...]
var aktiv=false;
function ChangeCol(tab,color)
{
document.getElementById('merke_dir').style.backgroundColor='#cccccc';
var merke_dir=tab;
document.getElementById(tab).style.cursor='hand';
if(tab.id!=aktiv)
{
document.getElementById(tab).style.backgroundColor = color;
}
}
function mouseoutColor(tab,color)
{
if(merke_dir==tab)
{
document.getElementById('tab').style.backgroundColor='red';
}
else
{
document.getElementById('tab').style.backgroundColor='#cccccc';
}
</script>
<table>
<tr style="background: #cccccc;" onclick="ChangeText('tab1','111'); ChangeLink('tab1','?auswahl=rechnungsdruck&bestell_nr=1'); this.style.backgroundColor='red'"
onmouseover="ChangeCol('tab1','green')"
onmouseout="mouseoutColor('tab1','#cccccc')">
<td id="tab1">
1111
</td>
</tr>
<tr style="background: #cccccc" onclick="ChangeText('tab2','222'); ChangeLink('tab2','?auswahl=rechnungsdruck&bestell_nr=2'); this.style.backgroundColor='red'"
onmouseover="ChangeCol('tab2','green')"
onmouseout="mouseoutColor('tab2','#cccccc')">
<td id="tab2">
2222
</td>
</tr>
[...]