• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mouse Positioning

 
Rob Hunter
Ranch Hand
Posts: 832
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Heres the situation: I have a table with 1 row and 5 columns. Each cell is going to act as a parent menu option. When I move the mouse over each cell there will be a menu showing up underneath the appropriate parent option. On the Adobe website is a good example of what I'm trying to do (i.e. the dropdown menus). I have each sub-menu created as tables that are surrounded by DIV tags, I then set the visibility to be true when the mouseover event occurs.

What I want to know is : how do you determine the mouse position on a mouseover? Since I'm using percentages is there a way of determining the position of a cell when re-sizing (i.e. the parent cells in this case) so that I can then set the position of the sub-menu accordingly if the window gets resized? On initializing the window I use stylesheets for the submenus' DIV tags (i.e. basically visibility: hidden but this doesn't seem to work in Netscape 4.X). I know this is an older browser but some customers still use this browser (corporations aren't quick on implementing such things as new broswers so I would like to handle 4.X browsers as much as possible). If someone could answer these questions could you try and keep in mind I'm trying to support as many versions of IE and Netscape as possible. Thanks so much.

Rob
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
With showing and hiding with Netscape 4.X you are going to go through hell since it requires a lot more pain in the butt stuff to do.

This code might help you in finding the position:

http://www.coderanch.com/t/114176/HTML-JavaScript/Coordinates-objects-without-Absolute-postioning

Showing and Hiding layers
http://www.geocities.com/technofundo/tech/js/showhide.html

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic