Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > onmouseover IE - Firefox

Thread Tools

onmouseover IE - Firefox

NetFlash NetFlash is offline
Junior Member
Join Date: Sep 2008
Posts: 2
K guys.....
I'm not a very experienced javascripter... that's why i need your help here.

A friend asked me to help solve his mouse over problem.
When run in IE it works perfectly.....
But doesn't in Firefox, Opera, Safari etc.......

I think that's because these browsers don't support VBscript... So i need to convert the code below from VBScript to JavaScript

Here's the code used....
</script><script language="VBScript" type="text/vbscript">
Dim MenuBGColor,MenuBGColorMouseOver,DontHide
Sub SetSubMenu(Src,Vis)
document.getElementById("submenu"&Right(Src.ID,2)) .style.pixelLeft=GetPos(document.getElementById("m enu"&Right(Src.ID,2)),"Left")+document.getElementB yId("menu"&Right(Src.ID,2)).offsetWidth
document.getElementById("submenu"&Right(Src.ID,2)) .style.pixelTop=GetPos(document.getElementById("me nu"&Right(Src.ID,2)),"Top")
document.getElementById("submenu"&Right(Src.ID,2)) .style.visibility=Vis
End Sub
Function GetPos(Src,sProp)
Dim iPos,iSrc:Set iSrc=Src
Do Until iSrc Is Nothing
If sProp="Left" Then iPos=iPos+iSrc.offsetLeft Else If sProp="Top" Then iPos=iPos+iSrc.offsetTop
Set iSrc=iSrc.offsetParent
End Function

.... and later used in the body........
<td id="menu01" align="right" onmouseout="SetSubMenu me,'hidden':me.bgcolor=MenuBGColor" onmouseover="SetSubMenu me,'visible':me.bgcolor=MenuBGColorMouseOver">
<img width="15" height="1" alt="" src="img/blank.gif"/>
<a style="font-family: arial; font-size: 14px; text-decoration: none; color: rgb(70, 70, 70);" href="index.aspx?pageid=28">Introductie</a>
<img width="15" height="1" alt="" src="img/blank.gif"/>


I would appreciate your help on this mather.....
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
onmouseover IE - Firefox NetFlash HTML 0 09-05-2008 01:39 PM
Onmouseover Event, Cursor property not working with Netscape or Firefox Jordan ASP .Net 1 06-10-2005 03:59 PM
onMouseOver event in Map in Firefox. Richard Brooks HTML 10 03-08-2005 11:20 PM
ASP.NET ImageButton and OnMouseOver Jay ASP .Net 2 09-30-2003 01:31 PM
How to change onmouseover and onmouseout dynamically Tor Inge Rislaa ASP .Net 3 08-06-2003 04:43 PM