• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Coordinates of a object in javascript...

 
Ranch Hand
Posts: 687
Hibernate jQuery Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ppl,
is it possible to find out if a object like select or a text box is present at a given coordinate.
say for eg i have the mouse on (x,y) coordinate as(300,300) is it possible for me to know what object lies at that coordinates.
thanx for any help in advance
 
Ranch Hand
Posts: 1061
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Devesh,
you could use an image-map

this also works with a transparent pixelsize Pic positioned absolutely over your objects
hth
 
Devesh H Rao
Ranch Hand
Posts: 687
Hibernate jQuery Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx christian for the answer but that is not what i was looking for i think i will give a example to the exact problem that i am facing.
In our application i have a menu which unfolds and goes to n levels which is dynamically decided from the no of nodes a user has access to in the database.
The problem in the page(it is a frame consisting of 3 framesets the top frame contains the menu, the middle frame the body and the third frame is the footer which contains the processing info) is when ever the menu unfolds over a select box the select box peeks thru the menu due to which the menu is not visible properly.
i have deployed a crude method in which i hide all the select objects in the page on opening the menu and the again make them visible when the menu collapses.I wanted to hide only the sepecific select box as an when it hinders the display of the menu hence my requirement for finding a object at a particular coordinate on the page.
Thanx for the help.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is a way to do it, I just got home from a trip, so I need to get some stuff done. If is done by referencceing the element object...
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Look at this, I only used the coordinates on the blue div box.
http://www10.brinkster.com/a1ien51/JavaRanch/ElementTest.htm
If you need more help understanding what i did, say so, and I will help.
eric
[ May 19, 2003: Message edited by: Eric Pascarello ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic