473,513 Members | 2,339 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

getting X, Y coordinates of objects with javascript for netscape 8

Hey,

is there anyway to get the X and Y cooridnations of an object in
javascript in Netscape 8?

the object is not absolutely positioned but with the flow of the page.

thanks

Oct 13 '05 #1
3 1351
abuhijleh wrote:
Hey,

is there anyway to get the X and Y cooridnations of an object in
javascript in Netscape 8?

the object is not absolutely positioned but with the flow of the page.

thanks

<URL:http://www.quirksmode.org/js/findpos.html>
--
Rob
Oct 13 '05 #2
RobG wrote:
<URL:http://www.quirksmode.org/js/findpos.html>


Although this script works in the simplest situations, there are some common
conditions where it fails.
My approach takes into account most of those conditions and will give more
consistant results:

http://www.mattkruse.com/javascript/...sitionTest.php

--
Matt Kruse
http://www.JavascriptToolbox.com
http://www.AjaxToolbox.com
Oct 13 '05 #3
Thanks guys, I wanted something very simple and RobG thing just did it
:).

Oct 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
39677
by: yzzzzz | last post by:
Hi I have: <div onkeypress="go(event)">...</div> and: function go(event) { alert(event.keyCode); }
1
3749
by: Toralf Lund | last post by:
Is there any way at all I can get a user's login name from within JavaScript on Unix/Linux with Mozilla browser. If not, how about the home directory? I know there are *usually* variables...
3
59215
by: Pavils Jurjans | last post by:
Hallo, Is there some decent way how to get the object class name in a string format? Currently I use this: function getClassName(obj) { if (typeof obj != "object" || obj === null) return...
2
1874
by: Weston C | last post by:
I'm wondering if it's possible to add a method to the Node and/or Element objects (so they'd subsequently be available to any node/element). I'd assume you could just do something like: ...
3
1810
by: Hermit Crab | last post by:
I'm seeing some unexpected (at least to me) behavior in the 'window' and 'document' objects under Netscape 7.1 and Internet Explorer 6.0. When a property is added to the prototype for 'Object',...
15
7029
by: Tony Gahlinger | last post by:
I'm using my browser (Mozilla/5.0 Linux i686 Gecko/20031007 Firebird/0.7) to do some client-side image processing. I want to capture the sequence of coordinates a user clicks on in xxx.jpg in the...
5
2553
by: oliver | last post by:
Hi, the structure of my source code is like this: <script> C = function(){ //some initialization } C.prototype.start = function{ //some action
2
1877
by: sasperilla | last post by:
Hi, I would like to find the coordinates of a word inside a div or span tag. I know you can find the coordinates of a tag inside the DOM, but can you get the coordinates of a portion of the...
1
2182
by: M | last post by:
Hi all, This is the script I use to find coordinates on a map and transfer them to textfields in the openerwindow. ++++++++++++++++++++++++ <HTML> <HEAD> <TITLEMouse Coords </TITLE> <script...
0
7267
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7175
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
7120
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7542
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5697
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3247
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3235
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1609
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.