Hello dev,
Kind Regards,
Christopher Dawes
Dawes International
www.dawesinternational.com
www.levelthirteen.net
-------------------------
Your message on Saturday, September 21, 2002 1:58:01 AM, you wrote:
S> I think you might need to use offsetLeft instead.
S> <div id="myDiv" style="height: 50; width: 50; position:absolute; left:
S> 350; top: 50;background-color: red;"> </div>
S> <script>
S> var output = '<table>';
S> obj = document.getElementById('myDiv');
S> for (var prop in obj) {
S> output += '<tr><td>' + prop + '</td><td>:<td>' + obj[prop] +
S> '</td></tr>';
S> }
S> output += '</table>';
S> document.write(output);
S> </script>
S> Spike
>> -----Original Message-----
>> From: Justin MacCarthy [mailto:[EMAIL PROTECTED]]
>> Sent: 20 September 2002 17:47
>> To: [EMAIL PROTECTED]
>> Subject: [ cf-dev ] quick JS / DOM / getElementById
>>
>>
>> Quick question.
>>
>> What is the DOM (ie+, ns7+ mozilla) method of getting the
>> position of a div?
>>
>> If I have a <div id="mybutton"><img src="..."></div>
>>
>> How do I get the position of the div?
>>
>> document.getElementById("mybutton").left is blank..
>>
>> Thanks
>>
>> Justin
>>
>>
>> --
>> ** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>>
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail:
>> [EMAIL PROTECTED] For human help, e-mail:
>> [EMAIL PROTECTED]
>>
>>
--
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]