problem with mouseover

4 views
Skip to first unread message

neetu

unread,
Sep 16, 2009, 1:47:56 AM9/16/09
to Fork JavaScript
Hi All

I a new to javascript. I am using the below javascript for expand
collpase menu. When user clicks to expand the menu, -image appears and
when clicks to collapse the menu,+ image appears. I want to use the
sme script for mouse hover. How can I.



<script type="text/javascript">
document.getElementById('personal_details').style. display='none';
document.getElementById('income_details').style.di splay='none';
document.getElementById('return_details').style.di splay='none';
document.getElementById('filing_details').style.di splay='none';

function switchMenu(id)
{
obj=document.getElementById(id);
col=document.getElementById("x" + id);

if (obj.style.display=='none')
{
obj.style.display='block';
col.innerHTML="<img src='/it_media/v4/n/images/minus2.gif'/>";
}
else
{
obj.style.display='none';
col.innerHTML="<img src='/it_media/v4/n/images/plus2.gif'/>";
}
}

</script>

Peter Michaux

unread,
Sep 16, 2009, 1:52:03 AM9/16/09
to forkjav...@googlegroups.com
General JavaScript questions are best sent to Usenet's comp.lang.javascript

http://groups.google.com/group/comp.lang.javascript

I recommend reading the FAQ first.

http://www.jibbering.com/faq/

Peter

neetu

unread,
Sep 16, 2009, 3:08:11 AM9/16/09
to Fork JavaScript
Thanks a lot

On Sep 15, 10:52 pm, Peter Michaux <petermich...@gmail.com> wrote:
> General JavaScript questions are best sent to Usenet's comp.lang.javascript
>
> http://groups.google.com/group/comp.lang.javascript
>
> I recommend reading the FAQ first.
>
> http://www.jibbering.com/faq/
>
> Peter
>
Reply all
Reply to author
Forward
0 new messages