function display(action)
{
if (action == 'show')
{
//show
document.getElementById("divname").style.display = "block";
}
if (action == 'hide')
{
//hide
document.getElementById("divname").style.display = "none";
}
}
<div id="divname" onmouseover="javascript:display('show')" onmouseout="javascript:display('hide')">
How can I change onmouseover="javascript:display('show')" onmouseout="javascript:display('hide')" with another onmouseover="javascript:display('showanother')" onmouseout="javascript:display('hideanother')"
I tried this with no results
Code:
function display(action)
{
if (action == 'show')
{
//show
document.getElementById("divname").style.display = "block";
document.getElementById("divname").onmouseover="javascript:display('showanother')";// so divname will make something on first onmouseover and then i want to change with another onmouseover .. in my case onmouseover="javascript:display('showanother')";
}
if (action == 'hide')
{
//hide
document.getElementById("divname").style.display = "none";
}
}
First refer it then implement into your code according to your requirement.
__________________
Please login or register to view this content. Registration is FREE
ASP.NET 3.5 | SQL 2005 Database | US Based Hosting Company | 24 X 7 Support | Daily Backups | Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE | Please login or register to view this content. Registration is FREE