R
Rick
I give up. I've been banging my head on the keyboard for the last
half-hour over this one. Can someone please point out what the heck I'm
doing wrong? I'm trying to move a block of text on screen. I have a div
element like this:
<div name="thetext" id="thetext" class="mtext">
blah blah blah
</div>
In the script to move the div, I try to retrieve the div's current
position. I do it this way:
obj = document.getElementById('thetext');
topPos = parseInt(obj.style.top);
leftPos = parseInt(obj.style.left);
I keep getting "NaN" for both topPos and leftPos. Can anyone tell me
why?
--Rick
half-hour over this one. Can someone please point out what the heck I'm
doing wrong? I'm trying to move a block of text on screen. I have a div
element like this:
<div name="thetext" id="thetext" class="mtext">
blah blah blah
</div>
In the script to move the div, I try to retrieve the div's current
position. I do it this way:
obj = document.getElementById('thetext');
topPos = parseInt(obj.style.top);
leftPos = parseInt(obj.style.left);
I keep getting "NaN" for both topPos and leftPos. Can anyone tell me
why?
--Rick