473,769 Members | 4,584 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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='javascr ipt:fContractSc rollTo("<%=hidS croll%>");'>
<html:form action="wspr/loadContract.go ">
<table >
<tr>
<td>radio button</td>
<td> Name </td>
<td> Age </td>
</tr>
</table>
<div id="divContract ID"
style="height:1 75;width:460;ba ckground:white; overflow:auto;" >
<table>
<logic:iterat e id="Contract" name="CONTRACTL IST">
<bean:define id="ContractVO " name="Contract" type="ContractV O" />
<tr>
<td>radio</td>
<td>Name</td>
<td>Age</td>
</tr>
</logic:iterate>
</table>
</div>
</html:form>
</body>
Javascript function like this
function fContractScroll To('val') {
window.scrollTo (0,document.get ElementById('di vContractID').s crollTop);
}

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

"Muralidhar " <km********@yah oo.com> wrote in message
news:ac******** *************** ***@posting.goo gle.com...
| 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='javascr ipt:fContractSc rollTo("<%=hidS croll%>");'>
| <html:form action="wspr/loadContract.go ">
| <table >
| <tr>
| <td>radio button</td>
| <td> Name </td>
| <td> Age </td>
| </tr>
| </table>
| <div id="divContract ID"
| style="height:1 75;width:460;ba ckground:white; overflow:auto;" >
| <table>
| <logic:iterat e id="Contract" name="CONTRACTL IST">
| <bean:define id="ContractVO " name="Contract" type="ContractV O" />
| <tr>
| <td>radio</td>
| <td>Name</td>
| <td>Age</td>
| </tr>
| </logic:iterate>
| </table>
| </div>
| </html:form>
| </body>
|
|
| Javascript function like this
| function fContractScroll To('val') {
| window.scrollTo (0,document.get ElementById('di vContractID').s crollTop);
| }
|
| 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
11653
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 | +---------------+ | body | | (scrollable) | +---------------+ | footer |
20
12306
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 appears as if Mozilla needs to have the focus set on that div in order for the mousewheel to work. That's all that link does. The mousewheel works perfectly in IE without the link. It scrolls the div even if there is a scrollbar on the page. Is...
25
36370
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 scrollable (with the ordinary scrollbars, no less). Whatever I try, the columns in the head and the body aren't aligned; the widths are computed independently which gives a completely ragged look. Michael --
7
2003
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 datagrid scrollbars are in their default state aka value = 0. How can I, if possible, retain the position so the user doesn't have to scroll back to the position (s)he was before the postback?
3
2219
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 columns. & depending on what the user enters, the data grid can grow very large. So to avoid scrolling the whole page, I just want the data grid to be scrollable. For this I used the <div> tags around the data grid, <div...
0
1446
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 usually be larger than the window containing the parent control), a time strip on top of it, and a resource list on the left. Long story short - when someone scrolls the scrollable data control, the time strip and resource lists are hooked to keep...
2
1810
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 I have never seen an option to make a grid scrollable. Does anyone know how that is done? Thanks,
1
16974
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 examples I found on the web. Works in IE and mozilla. http://www.imaputz.com/cssStuff/bigFourVersion.html
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8870
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.