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: Saturday July 14 2012 - 06:07:10

Why Does It Go Off the Screen?


Poster: darkcircuituk
Dated: Friday September 10 2004 - 12:31:44 BST

I am using the context right click menu as I am sure all of you know (I appologise for all my posts, I just have to know :-O ), and I have noted that if you right click at the edge of the page, the right click menu appears at the point of the right click resulting in the menu disapeering off the page, most annoying if the hyperlink you are right clicking on is at the edge of the page.

I was wondering if there was a way in which when the right click menu is goin to go off the page if it could be placed back onto the page with the bottom of the menu inline with the bottom of the page (like the standard microsoft one acts).

Any help you can provide on this problem will be greatly appreciated as usual.

Dave

Just as an afterthough, is there an award for the best kept support forum because if there was I would definately vote for yours!!! Keep up the good work you groovy cats!!!


Poster: Andy
Dated: Monday September 13 2004 - 11:29:40 BST

A url would be good, can you provide one?

-- Andy


Poster: tamagotchi
Dated: Monday September 13 2004 - 12:44:43 BST

Hi,

I think you can make a script to detect where the event.clientX (the X position of the mouse is) when the user clicks, and, knowing mouseX as mouse X coordinate, screenW as screenWidth and menuW as menuWidth, if mouseX>screenW-menuW then your menu should be shown with mouse pointer at the top-right corner of the menu.

You can reproduce this behavior to give you an idea on your computer desktop. Right click on it on the left edge, the menu will be displayed right to your mouse pointer. Right click on the right edge, and the menu will be displayed at the left of your mouse pointer...

Sorry


Poster: darkcircuituk
Dated: Tuesday September 14 2004 - 10:18:26 BST

I cant provide a url as the website is a part of the company intranet and therefore not made avaliable for outside use. The 'user' post stated clearly what I require, when a user right clicks so close to one of the edges of the screen that the menu disapeers off the screen, I wish for the menu to appear on the opposite side of the mouse pointer. For example, when the user right clicks to close to the right hand side of the screen, the menu will appear on the left side of the mouse pointer and if the user right clicks too close to the top of the screen, the menu will appear below the mouse pointer.

If you look at your sample right click menu, it portrays the same behaviour as the right click menu on our intranet (the menu disapeers off the screen).

I was wondering if you could provide any code to perform the above task.

Thank you for any help you can offer,

Dave


Poster: Andy
Dated: Tuesday September 14 2004 - 14:12:18 BST

Version 5.47 (going live in about 10 minutes) will fix the problem of context menus going of the page.

Cheers
Andy

ERRRRRR slight problem


Poster: darkcircuituk
Dated: Thursday September 16 2004 - 10:53:14 BST

One slight problem is that on the right hand side of the screen it works brilliantly the menu doesn't go off the screen at all, but at the bottom of the screen it takes a very novel approach of not goin off the screen. Instead of repositioning the menu back on the screen (like what happens when you right click on the right hand side of the window), it actually increases the size of the page and displays the menu in the new area.

I know this makes it hard to tell the problem but I cannot place the web address on here because its on the company intranet and therefore not avaliable to the outside world. But I can say that I believe the problem might be caused by the fact that we are using % when specifying the size of the page, but saying that, we specify the width of the page using %s too and that hasn't had the problem.

Hope you can help as always

Dave

Sorry Guys!!!!!


Poster: darkcircuituk
Dated: Thursday September 16 2004 - 12:07:23 BST

Sorry guys ignore my inane babbling, I only updated one of the files rather than both. Sorry again, I'll go and stand in the corner now :oops:

Everything works great :D

Re: Sorry Guys!!!!!


Poster: John
Dated: Thursday September 16 2004 - 15:27:15 BST

darkcircuituk wrote:
Sorry guys ignore my inane babbling, I only updated one of the files rather than both.

"Both"?? There are three files in the menu code, and all must be updated at the same time whenever there is a new release.


Poster: kevin3442
Dated: Friday September 17 2004 - 0:46:36 BST

It's an intranet, so I'm guessing that Dave eliminated mmenuns4.js from the mix. That should make you happy John!... one more victory in the fight to rid the world of NS4!

;)

Kevin


Poster: darkcircuituk
Dated: Monday September 20 2004 - 12:07:15 BST

Yup hes right, got rid of the NS4 file, dirty netscape, bad is netscape, bbaaadddddd


Poster: John
Dated: Monday September 20 2004 - 16:13:45 BST

kevin3442 wrote:
It's an intranet, so I'm guessing that Dave eliminated mmenuns4.js from the mix. That should make you happy John!... one more victory in the fight to rid the world of NS4!

Thought about that, but just had to be sure.