PDA

View Full Version : AnyLink Drop Down Menu



vfx
02-16-2005, 12:49 PM
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

i want the drop down menu to be center of the anchor link text.

so i would like to move the menu to the left a bit or the right

how would i do that? thank you

FPit
02-16-2005, 02:20 PM
Add text-align:center to dropmenudiv:

#dropmenudiv{
text-align:center;
position:absolute;
border:1px solid black;
font:normal 12px Verdana;
line-height:18px;
z-index:100;
}

vfx
02-16-2005, 03:56 PM
i want the menu to be centered from trigger link.

the entire menu can be shifted left or right.

ddadmin
02-16-2005, 11:35 PM
Well, the line:

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px"
within the script ultimately controls the left offset of the menu. You can add a number to it to increase its offset from the left edge of the link, for example:

dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+30+"px"

vfx
02-17-2005, 12:26 AM
thank you. DD rocks. it is just simply what i was looking for.

i have another question.

menu1[0]='<a href="http://www.javascriptkit.com">JavaScript Kit</a><br>'

i tried to include a pop up windows java script within <a href>

menu1[0]='<a href="http://www.javascriptkit.com" onclick="NewWindow(this.href,'name','333','168','no');return false">JavaScript Kit</a><br>'

do know any other method to embede a pop up windows with just specific width and height and no other properties such as url, scrolling etc...?

target=_blank just doesn't cut.

thanks.

p.s. if i mouseover the trigger link for several times(3+), the error code on ie status bar reads:

Line: 138
Char: 1
Error: Object doesn't support this property or method
Code: 0

bfisher
03-07-2005, 10:49 PM
I could be wrong, but I think you need to escape your single quotes. You're basically closing the string for the array element. Does anyone else have any thoughts?

philgolding
03-10-2005, 04:40 PM
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm


Anyone got this script working properly under OSX/MSIE... the first drop down works good, but then buggers up after that.

PG