Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Setting Scrollable position for div tag

Thread Tools

Setting Scrollable position for div tag

Posts: n/a
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
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 >
<td>radio button</td>
<td> Name </td>
<td> Age </td>
<div id="divContractID"
style="height:175;width:460;background:white;overf low:auto;">
<logic:iterate id="Contract" name="CONTRACTLIST">
<bean:define id="ContractVO" name="Contract" type="ContractVO" />

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

Is it possible to set the maintain the scrollable position in a div
Thanx in Advance
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Position fixed and scrollable DIV Marcus HTML 0 10-06-2008 10:11 AM
Select text within a div tag by clicking on content of div tag or a button? visu Javascript 4 11-22-2006 06:25 AM
element position inside scrollable div tag unixfreak compiler Javascript 0 02-17-2006 02:25 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Select text within a div tag by clicking on content of div tag? M Wells Javascript 0 10-06-2004 11:04 AM