Remembering position of dragable menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Remembering position of dragable menus

Post by Columcille »

I've just been playing with the dragable menus and am wondering if anyone knows a way to record the top and left position of a menu after it has been dragged? I'm wanting a way to store the position in a database so the menu will remain where the user wants it when they move from page to page. The code to store the data isn't a problem, I'm just not sure how to get the current menu top and left position.
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Post by Columcille »

well, 2 minutes after posting my question I may have found my own answer. :) I really did look around before asking, just not careful enough I guess. So, from the page http://milonic.com/menu_methods.php I learned of the gpos method which returns the current position and dimensions of any menu. Looks like exactly what I wanted! Thanks to everyone that would have replied if I hadn't answered myself first. :)
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Post by Columcille »

I do have another question to throw out. Would there be any way to detect a move menu event? I've got an idea or two of what to do if not, but the simplest and probably most efficient code would be to store the position right after a move event, so I just have to figure out how to detect those events. :)
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Post by Columcille »

okay, I'm not going to post any more on this hehe. But I think I've found another solution. The dragable.js scriptlet is not obfuscated, so tweaking it would be relatively minor. Rather than trying to detect a drag event from outside, the script itself could be modified to call another function at the end of a drag event. I haven't looked it over carefully, but this would probably go in _DDstop().
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Not a problem on finding the solutions. We have all done that, if we would admit it ;) I thank you for posting what you found. It's real frustrating when someone finds their solution and posts "nevermind, found it" Well, heck, let us know what it is! :lol:

As to the last question and your solution. That is probably not going to be a problem, but you really are not supposed to modify code. Milonic are very good about things like that, we just ask that you contact them with your desire on it, they probably will have no problem, but I can't speak for them.

Ruth
User avatar
vhenin
Beginner
Beginner
Posts: 2
Joined: Wed Oct 21, 2009 10:45 am
Location: Brussels, Belgium

Re: Remembering position of dragable menus

Post by vhenin »

Hi Everybody,

I am creating a Portfolio Online for my drawings and illustrations.
I am using a Milonic dragable menu.

This post is exactly what I was looking for: a way for the dragable menu to stay in place even whenever the webpage is refreshed or changed.
I saw the reply of and went to this page:
http://milonic.com/menu_methods.php
for the array gpos ( Object_Ref )

But where do I have to place this function? In which .js?
Could you please help me understand how to use it?

Thanks a lot on forehand for your help,

Vincent
User avatar
vhenin
Beginner
Beginner
Posts: 2
Joined: Wed Oct 21, 2009 10:45 am
Location: Brussels, Belgium

Re: Remembering position of dragable menus

Post by vhenin »

Can someone help me???
Pleeeaaase....

Thanks!

Vincent
Post Reply