onmouseover IE - Firefox


Joined
Sep 5, 2008
Messages
2
Reaction score
0
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
MenuBGColor="#<%=TBGColor%>"
MenuBGColorMouseOver="#<%=TBGColorOver%>"
Sub SetSubMenu(Src,Vis)
document.getElementById("submenu"&Right(Src.ID,2)).style.pixelLeft=GetPos(document.getElementById("menu"&Right(Src.ID,2)),"Left")+document.getElementById("menu"&Right(Src.ID,2)).offsetWidth
document.getElementById("submenu"&Right(Src.ID,2)).style.pixelTop=GetPos(document.getElementById("menu"&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
Loop:GetPos=iPos
End Function
</script>

.... 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"/>
</td>

----------------------------------------------------------------------------------------------------------------------------------------------------------

I would appreciate your help on this mather.....
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top