Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Thursday February 8 2018 - 06:02:22

Need menu item to move menu position


Poster: don __at__ markspp.com
Dated: Saturday October 18 2003 - 0:41:39 BST

I'm trying to get setup, and per Milonic "better practic" suggestion I'm attempting to rid my website of frames. Consequently, not all of my pages are layed out to accept a menu in the same position. I downloaded the sample that lets you move a menu via form controls which got my attention... But I'd like for users to be able to do this through the menu.

My testing page is at http://www.markspp.com/don/test.html and the bottom item "MOVE THIS MENU" will have sub-items "Top Left", Top Right" etc...

But when I make the respective functions

function topleft(){
_hpos="left"
_vpos="top"
updateScreenPosition()
}

I'm getting an error. I'd like the functions to be centralized so I don't have to put them in each and every page.

Thanks,
Don


Poster: Hergio
Dated: Saturday October 18 2003 - 14:42:55 BST

If you are using updateScreenPosition "as is" from the sample page than you will definetly get errors. Andy has made that function very specific to that page as he hardcoded the form variable into it, the inputs, how those inputs set variables to affect the menu, etc. You need to definetly edit that function to make it do what you want. Once you have editted it, and still have errors, post up here what your code is.

Secondly, if you want to import all your functions into every page that uses the menu, the easiest thing to do would be to copy all your functions and paste them into the top of your menu_data file. just put the "function name(){...}" right at the top. But the cleaner and more scalable thing to do would be to have something like a common.js file that you put them in, and then just include that file into every page much like you do the menu scripts. That way you have a js file you can add to that every page has access to. Hope you get everything working.


Poster: don __at__ markspp.com
Dated: Saturday October 18 2003 - 14:52:17 BST

Thanks, I played around with it some more and got it working... I passed the _vpos and _hpos vars as arguments and it liked that.

Don