473,397 Members | 2,068 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Setting Scrollable position for div tag

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;overf low: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('divCont ractID').scrollTop);
}

Is it possible to set the maintain the scrollable position in a div
tag.
Thanx in Advance
Jul 20 '05 #1
1 11254
Not really. But I would use anchors to scroll with in any event (no script
required.)

"Muralidhar" <km********@yahoo.com> wrote in message
news:ac**************************@posting.google.c om...
| 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;overf low: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('divCont ractID').scrollTop);
| }
|
| Is it possible to set the maintain the scrollable position in a div
| tag.
| Thanx in Advance
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Matt Kruse | last post by:
This is a typical layout, but I have specific requirements. I'm trying to figure out a) if it's possible to meet the requirements and b) if so, how. +---------------+ | header |...
20
by: Arne | last post by:
During testing <div style="overflow:auto;"> in CSS I noticed the mousewheel would work in Mozilla only after I made a <a href="#">some text</a> link and clicked on that, within the div. It...
25
by: Michael Schuerig | last post by:
I'm trying to do something seemingly very simple, but it's brought me close to crushing my head on the keyboard. All I want is a table where the head row is fixed and the body columns below are...
7
by: EMW | last post by:
I have used the info on this page to create a scrollable datagrid. http://www.datawebcontrols.com/faqs/CustomizingAppearance/ScrollableDataGrid.shtml But now everytime after a postback the...
3
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
0
by: Rune Jacobsen | last post by:
Hi all, In my project I have a control (described in an earlier post) which basically consists of three "subcontrols": One big area where the vital data is displayed (scrollable, since it will...
2
by: tshad | last post by:
I was just looking at a site that had scrollable grids and was wondering how that is done? It was an aspx page, but I have only seen Datagrids that were non-scrollable. You can page a grid but...
1
by: since | last post by:
I figured I would post my solution to the following. Resizable column tables. Search and replace values in a table. (IE only) Scrollable tables. Sortable tables. It is based on a lot...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.