MyBB.de Forum

Normale Version: Cell-Highlight in IE , Firefox , Opera , usw.
Du siehst gerade eine vereinfachte Darstellung unserer Inhalte. Normale Ansicht mit richtiger Formatierung.
Hallo

in meinem Forum habe ich folgende Java-Scrip eingefügt damit die Tabellen-Zellen eine andere Farbe bekommen sobald mit der Maus darüber fährt. Man kann danach einfach auf die Zelle klicken und man wird automatisch zum letzen Forumseintrag geführt.

forumbit_depth2_forum:
PHP-Code:
<tr>
<
td class="{$bgcolor}align="center" valign="top"><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif"forumicons/{$lightbulb['folder']}" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" /></td>
<td class="
{$bgcolor}" alt="trow1" valign="top">
<strong><a href="
forumdisplay.php?fid={$forum['fid']}">{$forum['name']}</a></strong><div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="
{$bgcolor}" valign="top" align="center" style="white-spacenowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="
{$bgcolor}" valign="top" align="center" style="white-spacenowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="
{$bgcolor}" alt="trow1" valign="top" align="right"left" style="white-space: nowrap">{$lastpost}</td>
</
tr>

<
SCRIPT LANGUAGE="JavaScript"
<!-- 

var 
mouseOverColor '#D9E2EC'
var 
statusMessage 'Willkommen im Börsenportalforum'
window.status statusMessage

cellHigh document.getElementsByTagName('TD'); 
for(
ch=0;ch<cellHigh.length;ch++) { 
if ((
cellHigh[ch].className=="trow1" && cellHigh[ch].valign=="top" )  || (cellHigh[ch].className=="trow1" && cellHigh[ch].alt=="trow1") || (cellHigh[ch].className=="trow2" && cellHigh[ch].valign=="top" )  || (cellHigh[ch].className=="trow2" && cellHigh[ch].alt=="trow1")) { 
if (
cellHigh[ch].width=="100%") {var num=0;} else {var num=1;} 
cellHigh[ch].onmouseover = function(){this.style.cursor='hand';this.style.backgroundColor=mouseOverColorwindow.status=this.getElementsByTagName('a')[0].innerHTML;};
cellHigh[ch].onmouseout = function(){this.style.backgroundColor=this.bgColorwindow.status=statusMessage;};
cellHigh[ch].onclick = function(){location this.getElementsByTagName('a')[0].href;}; 
}} 
// --> 
</script

Leider funktioniert das ganze nur im MS-IE . Beim Firefox werden die Zellen nicht Highlighted :-((

Im alten Forum (http://www.boersenportal.ch/forum) das unter phpBB lief funktionierte das ganze auch unter Firefox !

Woran liegt das und wie kann ich das auch zum funktionieren bringen unter Firefox ?

Salamander
Das ganze sollte auch per CSS gehen:
Code:
.trow1:hover, .trow2:hover {
    background: #xxxxxx;
}