[solved] Need an assist determining an object's placement...
Posted: Mon Jan 02, 2006 11:17 am
I am writing an ajax autoselect for textfields (and I will share it when I'm done
). I'm having a wee bit of a challenge though figuring out how to determine my object's placement on the page (text field object).
I need this so I can drop my selections directly below it. I've discovered that the text fields do not have the top nor left style properties as I expected they would
thus:
will NOT work. That doesn't throw an error, it just alerts blanks.
anyone know a way to determine a text field's placement on the page dynamically?
I need this so I can drop my selections directly below it. I've discovered that the text fields do not have the top nor left style properties as I expected they would
thus:
Code: Select all
<script>
function dropIn(obj)
{
alert(obj.style.left+" "+obj.style.top);
}
</script>
<input type="text" name="somefield" onKeyUp="dropIn(this)">anyone know a way to determine a text field's placement on the page dynamically?