As we sometimes place a dynamic HTML elements within an image on the page, it is important to know how to extract an image's width and height, and more importantly its coordinates with respect to the page's top left corner. The imgID parameter should be passed by reference as oppose to a string. The best method to verify it is passed by reference is to print it to an alert box and verify that it is an object.
Parameters passed by reference are actually objects.
Parameters passed by string are string constants. The reason being that Internet Explorer does not provide us with the equivalents to x and y properties in Netscape Navigator. The trick is to use the offset family of properties. The offsetParent returns the parent of the current element. The offsetLeft and offsetTop properties show the x and y coordinates of the element with respect to its parent.