I have a page with several elements, ranging from tables to inputs of type text, checkbox, button etc...
I have a div created at the start with the following properties, style="position:absolute;top:0px;left:0px;zIndex:100;visibility:hidden"
What I was trying to do is change the innerHTML of this div and position it around the page, usually over some textbox but I am not able to position it correctly. Using the offsetTop and offsetLeft properties of the textbox would return something like 2 and 3, which is the offset of the textbox within its parent.
Is there a way to get it based on the <body>? Or is it possible to position the left and top of the div to the left and top of the textbox?
Thanks in advance.
-----------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook
I have a div created at the start with the following properties, style="position:absolute;top:0px;left:0px;zIndex:100;visibility:hidden"
What I was trying to do is change the innerHTML of this div and position it around the page, usually over some textbox but I am not able to position it correctly. Using the offsetTop and offsetLeft properties of the textbox would return something like 2 and 3, which is the offset of the textbox within its parent.
Is there a way to get it based on the <body>? Or is it possible to position the left and top of the div to the left and top of the textbox?
Thanks in advance.
-----------------------------------
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rich Cook