sample code to get top and left position of textbox

Hi friends.I want to get top and left position of a textbox that is placed in table.A textbox has no top and left attributes when it is placed in table.Its very urgent...Help meThanks in advance..
[238 byte] By [vimsa] at [2007-10-3 0:19:34]
# 1
problems not clear enough to solve
jgalacambraa at 2007-7-14 17:10:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Its a very weird requirement. I wonder why you might want to do that.

Anyways you may try putting the textbox in a DIV tag. Ex :-

<DIV id="ROHIT" name="ISGREAT" style="position:relative;left: 0px;">

<input type="textbox" name="mera_wala_textbox"

></DIV>

You can find the location of the Div tag postion in some javascript function.

function jhakaas_Function()

{

var tabObj1 = document.getElementById("ROHIT");

// this the position of your textbox shown in alert

alert(tabObj1.style.left);

//alert("Say thanx to Rohit");

}

hope this helps ;-)

Regards

Rohit Kumar

RohitKumara at 2007-7-14 17:10:55 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...