Setting Scrollable position for div tag

M

Muralidhar

Hi,
I'm having a jsp page which is having a table and a div tag.The
heading such as a radio button,Name , Age etc. are fixed.Only the data
under it is scrolling. So i've set one table for header which are
fixed.
Then a div tag inside which there is a table which is used for
scrolling the data.When i select a radio i'm submitting the form.The
problem is here i'm able to set focus to the radio button, but i'm
unable to maintain the scrolling position, when i scrolled downeards.I
want the same scrolling position as it was before submitting the form.

Code is something like this


<body topmargin=0 leftmargin=0
onLoad='javascript:fContractScrollTo("<%=hidScroll%>");'>
<html:form action="wspr/loadContract.go">
<table >
<tr>
<td>radio button</td>
<td> Name </td>
<td> Age </td>
</tr>
</table>
<div id="divContractID"
style="height:175;width:460;background:white;overflow:auto;">
<table>
<logic:iterate id="Contract" name="CONTRACTLIST">
<bean:define id="ContractVO" name="Contract" type="ContractVO" />
<tr>
<td>radio</td>
<td>Name</td>
<td>Age</td>
</tr>
</logic:iterate>
</table>
</div>
</html:form>
</body>


Javascript function like this
function fContractScrollTo('val') {
window.scrollTo(0,document.getElementById('divContractID').scrollTop);
}

Is it possible to set the maintain the scrollable position in a div
tag.
Thanx in Advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top