Looking for a solution to scroll a table horizontally to specific locations by clicking anchor tags outside of its frame? I initially used inline js which worked with the old table, but after updating to CSS, it stopped working. Seeking assistance from experts out there! Thanks in advance.
Sample code being utilized:
HTML frame referring to the frame containing the table:
<iframe src="PrimaryTables.html" id="FrameTableIsIn" name="FrameTableIsIn" scrolling="yes" align="middle" height="1350" width="100%" marginwidth="0" marginheight="0" frameborder="no"></iframe>
HTML Document inside iframe (FrameTableIsIn):
<div class="container" id="contained">
<table width="100%" cellspacing="1" cellpadding="0" border="0" id="primerows">
<tr>
<td class="fixed">STUFF HERE</td>
<td class="fixedspecial"align="center" valign="middle">STUFF HERE THAT OVERLAPS THE PREVIOUS TD STUFF NICELY</td>
<td>OTHER STUFF HERE REPEATING COLUMNS</td>
</tr>
</table>
</div>
A long table with rows and columns handled nicely with CSS, as shown below:
<style>
td, th {
white-space: nowrap;
min-width: 100px;
height:32px;
vertical-align: middle;
}
.container {
overflow-x: scroll;
margin-left: 100px;
}
.fixed {
height:30px;
border: 1px solid #000000;
position: absolute;
left: 0;
display: inline-table;
text-align: center;
vertical-align: middle;
}
.fixedspecial {
border: 1px solid #000000;
position: absolute;
left: 0;
height:35px;
}
</style>
Inline java script on page outside of iframe to affect document inside FrameTableIsIn:
<A HREF="javascript:parent.InitialFrame.FrameTableIsIn.scrollTo(110,0);parent.InitialFrame.scrollTo(0,50);" TARGET="InitialFrame">Link Text Here</A>
Previously, clicking the link would scroll the table horizontally to the specified location and then jump to the top of the page. However, with CSS, the horizontal scroll doesn't work due to the scroll feature being confined within the div element. Need help with proper handling...
If possible, prefer inline java to avoid cluttering the code further and bringing back memories of Pascal coding!