I'm trying to make an OnMouseOver background change in a <td>. This is the function i'm using:
------------------------------
function flipbg(element,mode)
{
if (mode=="over"
{
cursortype = 'hand'
picture = 'images/menu-over.gif'
}
else if (mode=="out"
{
cursortype = ''
picture = 'images/menu-normal.gif'
}
element.style.background=picture;
element.style.cursor=cursortype;
}
----------------------------------------
And this is how I call the function:
----------------------------------------
<tr><td background="images/menu-normal.gif" onmouseover='flipbg(this,"over"
;' onmouseout='flipbg(this,"out"
;' align='left'> Link Text!! </td></tr>
-------------------------------------------
But it's not working. What have I done wrong?
Thanks! __________________
Visit my homepage
.: Game universE :.
------------------------------
function flipbg(element,mode)
{
if (mode=="over"
{
cursortype = 'hand'
picture = 'images/menu-over.gif'
}
else if (mode=="out"
{
cursortype = ''
picture = 'images/menu-normal.gif'
}
element.style.background=picture;
element.style.cursor=cursortype;
}
----------------------------------------
And this is how I call the function:
----------------------------------------
<tr><td background="images/menu-normal.gif" onmouseover='flipbg(this,"over"
-------------------------------------------
But it's not working. What have I done wrong?
Thanks! __________________
Visit my homepage
.: Game universE :.