Hallo,
irgendwie stell ich mich hier grad zu blöd an. Ich will folgende Funktion bei einen MouseOver sowie MouseOut auf einem Div abwickeln:
	
	
(Den Variablen $systemStatus, $color und $date wird ein Wert zugewiesen - Checked!)
Problem: Die Farbzuordnung mit dem Parameter color funzt nicht un der body onload stoppt daher nicht.
Frage: Wie hat diese Farbzuordnung richtig auszusehen?
							
						
					irgendwie stell ich mich hier grad zu blöd an. Ich will folgende Funktion bei einen MouseOver sowie MouseOut auf einem Div abwickeln:
Code:
	
	function colorStatusDiv(color) {
	if (document.getElementById('systemStatusDiv').style.background-color == 'yellow') {
		document.getElementById('systemStatusDiv').style.background-color = color;
	} else {
		document.getElementById('systemStatusDiv').style.background-color = 'yellow';
	}
}
PHP-Code:
	
	
$displaySystemStatus = '<div id="systemStatusDiv" style="'
                    . 'background-color:' . $color . ';'
                    . 'color:white;'
                    . 'text-align:center;'
                    . 'vertical-align:middle;'
                    . 'width:200px;'
                    . 'height:30px;'
                    . 'border:1px white solid;'
                    . 'text-transform:uppercase;" '
                    . 'onMouseOver= "colorStatusDiv(' . $color . ');" '
                    . 'onMouseOut= "colorStatusDiv(' . $color . ');" '
                    . 'onClick="changeSystemStatus(' . $systemStatus . ');'
                    . '">'
                    . $systemStatus . ' since ' . $date
                    . '</div>';
print $displaySystemStatus; 
Problem: Die Farbzuordnung mit dem Parameter color funzt nicht un der body onload stoppt daher nicht.
Frage: Wie hat diese Farbzuordnung richtig auszusehen?
							
						
          
							
						
							
						
							
						
Kommentar