Why Does It Go Off the Screen?
-
- Super Advanced
- Posts: 49
- Joined: Sat Aug 21, 2004 2:57 pm
Why Does It Go Off the Screen?
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!!!
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!!!
-
- Beginner
- Posts: 6
- Joined: Mon Sep 13, 2004 8:48 am
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...
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...
-
- Super Advanced
- Posts: 49
- Joined: Sat Aug 21, 2004 2:57 pm
Sorry
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
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
-
- Super Advanced
- Posts: 49
- Joined: Sat Aug 21, 2004 2:57 pm
ERRRRRR slight problem
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
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
-
- Super Advanced
- Posts: 49
- Joined: Sat Aug 21, 2004 2:57 pm
Sorry Guys!!!!!
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
Everything works great

Everything works great

Re: Sorry Guys!!!!!
"Both"?? There are three files in the menu code, and all must be updated at the same time whenever there is a new release.darkcircuituk wrote:Sorry guys ignore my inane babbling, I only updated one of the files rather than both.
John
-
- Super Advanced
- Posts: 49
- Joined: Sat Aug 21, 2004 2:57 pm