Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Mouse Positioning

 
Ranch Hand
Posts: 837
  • 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
 
author
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:

https://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
 
Run away! Run away! Here, take this tiny ad with you:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!