This is a discussion on "Control coordinates on screen" within the JavaScript Forum section. This forum, and the thread "Control coordinates on screen are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
Control coordinates on screen
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Control coordinates on screen
Hi to all,
my problem was to detect the coordinates for each control on the web page. Since I was not successful in finding any property to retrieve such information, I wrote the following code to get it out. The code follows at the bottom of this post. Basically, one calls getOBJfunction( id, "top" ) and getOBJfunction( id, "left" ) to retrieve the Y and X coordinate of the control within the webpage. The parameter id indicates the id property of the given control, according to the nomenclature used along the web page. Thus, for example, the position of <INPUT ID="item1"> can be tracked down via * getOBJposition( "item1", "top" ); * getOBJposition( "item1", "left" ); My personal use is to place floating divs over the screen and in particular below a input control where data search are performed. I wanted to post this message to have suggestions for further improvements. Thanks in advance to all checking in this topic. Alessandro Rosa
Last edited by c010depunkk; Feb 9th, 2008 at 08:34. Reason: please use [HTML] tags when posting HTML |
|
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ASP.NET Control ViewState | Basheer | ASP.NET Forum | 2 | Apr 14th, 2007 10:25 |
| Movieclip Control | dazzelworks | Flash & Multimedia Forum | 3 | Oct 30th, 2006 13:11 |
| Background control | ahm531 | Web Page Design | 6 | Aug 30th, 2006 14:45 |
| display a image-map grid cell coordinates | paokun | JavaScript Forum | 3 | Feb 5th, 2006 17:19 |