...

View Full Version : THEAD Jumps from InnerText Set



Macgyver
08-09-2006, 05:21 PM
Hello Everyone,

I've been racking my brain trying to figure out what the heck is going on, but no luck. Maybe someone here has encountered a similiar problem

I have a scrollable table, using <THEAD> to display column headers for a generated data set. I'm using the DHTML property 'innerText' on a <DIV> tag to set a value in the <TBODY> of the table to be used as a dynamic recognition that a property has been set. This is causing the THEAD to move upwards in direct correlation to how far down the scrollable table I am.

Here is some code...
<table class='scrollTable' id='mySortTable' width='550px'>"
<thead class=\"fixedHeader headerFormat\" id='sortTableHead'>"
<tr>
<td class='point_invis' >SomeText</td>
<td>Sometext</td>"
<td><b>Sometext</b> </td>
<td align='right'>sometext</td>
</tr>
</thead>
<tbody>
<tr>
<td class='point_invis' ><div>TEXT THAT I AM CHANGING</div></td>
<td>Sometext</td>"
<td><b>Sometext</b> </td>
<td align='right'>sometext</td>
</tr>
....
....

</tbody>
</table>


This is the javascript statement I am using to change the text inside the div..
mySortTable.getElementsByTagName("DIV")[0].innerText = '0';

Like I said, when this happens the scrollable table header moves upward to the hidden portion of the table at the top.

Thanks,

Macgyver



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum