IgnacioH
01-22-2005, 08:22 PM
I have the following functions:
function a()
{
var d
d="this.style.backgroundColor='#0f0'";
return d
}
function b()
{
var d
d="this.style.backgroundColor='#00f'";
return d
}
Then, inside my page, I have some divs elements that I would like to assign the onmouseover / onmouseout event with the result of the functions as arguments:
<div id="menu_bi" onmouseover="a()" onmouseout="b()">Item 1</div>
Can this be done? Haven't work for me yet.
Thanks,
Ignacio
function a()
{
var d
d="this.style.backgroundColor='#0f0'";
return d
}
function b()
{
var d
d="this.style.backgroundColor='#00f'";
return d
}
Then, inside my page, I have some divs elements that I would like to assign the onmouseover / onmouseout event with the result of the functions as arguments:
<div id="menu_bi" onmouseover="a()" onmouseout="b()">Item 1</div>
Can this be done? Haven't work for me yet.
Thanks,
Ignacio