mk4th
10-18-2007, 01:36 PM
1) Script Title:
AnyLink Drop Down Menu
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm
3) Describe problem:
How can I center the the menu to the middle of somthing?
Well, I tried somthing like:
function fixOffset(){
var cellID = window.event.srcElement;
if (cellID.tagName != "TD")
cellID = window.event.srcElement.parentElement;
return (cellID.offsetWidth/2-65); //65 it is half the menu width
}
And I have changed that:
dropmenuobj.x=getposOffset(obj, "left")+fixOffset();
but it is working only for IE... FF says nop.
thanks
MK
AnyLink Drop Down Menu
2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm
3) Describe problem:
How can I center the the menu to the middle of somthing?
Well, I tried somthing like:
function fixOffset(){
var cellID = window.event.srcElement;
if (cellID.tagName != "TD")
cellID = window.event.srcElement.parentElement;
return (cellID.offsetWidth/2-65); //65 it is half the menu width
}
And I have changed that:
dropmenuobj.x=getposOffset(obj, "left")+fixOffset();
but it is working only for IE... FF says nop.
thanks
MK