PDA

View Full Version : AnyLink Drop Down Menu



Mike Phillips
11-10-2005, 07:55 AM
AnyLink Drop Down Menu
http://www.dynamicdrive.com/dynamicindex1/dropmenuindex.htm

Hi, this script is fantastic but I have a problem with it that I haven't been able to work out. Basically the script attempts to intelligently work out if it can display the drop down menu or not, if it perceives that it can't go down, it will go up. Unfortunately it sees my IFrames as the bottem of the page and thus sends the menu upwards. Is there any way in which i could "turn off" this and force the menus to drop down no matter what, seeing as they are always at the top of the page?

Many thanks for your time.

Mike

Mike Phillips
11-11-2005, 12:21 AM
http://www.thestudenthouse.co.uk/Draft/draft.htm

I managed to solve the link problem of where the link opens, just by forcing it to load in the parent frame( target="_parent"). Unfortunately though I havent been able to sort out the way in which the banner drops.
Any clues?
Mike

ddadmin
11-11-2005, 01:36 AM
Try simply editing the line:


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


to:


dropmenuobj.style.top=dropmenuobj.y+obj.offsetHeight+"px"

Mike Phillips
11-11-2005, 11:37 PM
Erm that didnt quite work. Is there anyway in which I can just delete the "if" function that questions whether it can fit, so that it just opens when the mouse hovers over the button.

Also, I stupdily have only just thought of this... If the menu drops down within the IFrame it will be hidden behind the parent frame. Is there anyway that I can make an object within the IFrame overflow onto the main page. I know its unlikely but i reallllllly don't want to have to come up with a new way of displaying links. Does anyone have any ideas/solutions?
Thanks
Mike

raystrach
11-12-2005, 12:13 AM
i don't have an answer for you on your question, but i did look at implementing. this menu but decided to go with the anylink css menu.

i have just started to use css for positioning instead of tables. I have tried quite a few drop down menus over the last few years and this css menu is the best 2 level menu that i have used. you only have to know basic css and it is totally flexible to position and format. (the only draw backs are its only 2 level and (for some) the menu items are on the web page)

the z-index makes it very easy to overlay other tags - you could even use div tags with scrolling instead of i-frames. if you know php or other programming languages you could set the contents of the scrolling tag in a function instead of a file.

another way to overcome the visibility problem without making too many changes could be to "style" the elements and use the z-index to set an order and positoning - it could work

my site is http://www.squashgame.info