Setting Scrollable position for div tag

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Muralidhar

    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
  • Nobody

    #2
    Re: Setting Scrollable position for div tag

    Not really. But I would use anchors to scroll with in any event (no script
    required.)

    "Muralidhar " <kmreddy_39@yah oo.com> wrote in message
    news:acca7d14.0 309010356.66522 d59@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


    Comment

    Working...