Mark wrote on 18 Dec 2003 at Thu, 18 Dec 2003 03:46:07 GMT:
[color=blue]
> I cannot read the x and y properties of the anchor object.
> The object is valid.
>
> Why not or how come?[/color]
It is usually a good idea to provide more information than that
above.
In the future, please include the following:
1) A relavant code example. In this case, the object and the
properties or methods you used to get the values
2) The browser, version and platform that you used to test your code
3) What values you did get and what you expected (not relavant in
this case)
This helps to rule out any syntax errors you made, or any known
issues with that browser.
In this instance, it's probably because you're trying to use a
property not supported by your browser. Try this:
if (obj.x && obj.y) {
// Use the .x and .y properties
} else if (obj.offsetLeft && obj.offsetTop) {
// Use the .offsetLeft and .offsetTop properties
}
where obj is the anchor object you're checking.
Be aware that the numbers returned may change in different browsers.
For example:
Comment