Win a copy of Zero to AI - A non-technical, hype-free guide to prospering in the AI era 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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

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.

Posts: 15385
  • 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:

Showing and Hiding layers

Hang a left on main. Then read this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic