This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C1CAD2.1F9B7830
Content-Type: text/plain
check reference to getElementById. It may be an IE only thing.
-----Original Message-----
From: True2ViSioN@a... [mailto:True2ViSioN@a...]
Sent: Wednesday, March 13, 2002 3:56 PM
To: javascript
Subject: [javascript] a little help
i am tring to make a drop dowmenu and i got a little problem with the
positioning x and y my code is this
<SCRIPT type=text/javascript>
var ns = (navigator.appName.indexOf('Netscape')>-1);
var ie = (navigator.appName.indexOf('Microsoft Internet Explorer')>-1);;
function showMenu(menuToShow, e)
{
var DIVElement = document.getElementById("menu1");
DIVElement.style.visibility = "visible"
if (ns)
{
var srcElement = e.target;
}
else
{
var srcElement = event.srcElement;
}
//* var xPos = parseInt(srcElement.style.left);
//* var yPos = parseInt(srcElement.style.top);
menuToShow.style.left = xPos + (srcElement.width)
menuToShow.style.top = yPos;
}
</SCRIPT>
<a class="menuButton" onmouseout="" onclick="return
showMenu(document.getElementById('menu1'),event)" href="#">Button 1</a>
any ideas at what im doing wrong
NOTE:
the x and y code come from the book
begginging javascript
//* == what the main problem is ---