PDA

View Full Version : AnyLink Vertical Menu



esm
04-13-2007, 07:09 PM
Hi,

I'm trying to use the AnyLink Vertical Menu in a website and it works fine. However, I have two questions:

1. Can the drop down menu be vertically adjusted?
2. Can the script be placed off-site in a script folder, adding a line like <script language="javascript" src="script/menu.js"></script> in the HEAD section?

Thanks.

ddadmin
04-14-2007, 05:56 AM
Warning: Please include a link to the DD script in question in your post. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

Regarding your question 1), can you clarify what you mean by "vertically adjusted?"

esm
04-14-2007, 02:49 PM
Sorry for not including the link, here it is:

http://www.dynamicdrive.com/dynamicindex1/anylinkvertical.htm

As to the vertical adjustment, I wanted to find out if I can place the drop-down a couple of pixels up or down.

Thanks

ddadmin
04-14-2007, 09:39 PM
Certainly. To offset the vertical position of the menu slightly, up or down, find and edit this line:

dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+5+"px"

The "+5" part is new, and would move the menu 5px down. You can use a negative integer to move it up instead.

esm
04-14-2007, 10:07 PM
That works fine, thanks a lot!

How about my other question?

Thanks.

esm
04-15-2007, 12:38 AM
Hi,

This is a follow-up question on the vertical adjustment. It works fine for drop-downs that actually open downward. However, drop-downs that open upward (drop-ups? :-)) show a noticable offset. Is there any way to set this offset independently?

Thanks.

ddadmin
04-15-2007, 11:33 AM
Certainly. To answer both of your questions in one scoop, remove the original script and add the below code reference instead:


<script type="text/javascript" src="anylinkvertical.js">

/***********************************************
* AnyLink Vertical Menu- &#169; Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>

Then, use anylinkvertical.js that's attached below. It lets you set the vertical offset for both when the menu is dropping down (default), and dropping up:


var verticaloffset=[10, -10] //vertical offset

esm
04-16-2007, 08:31 PM
Works beautifully! Thanks a bunch!

esm