Setting Scrollable position for div tag

Discussion in 'Javascript' started by Muralidhar, Sep 1, 2003.

  1. Muralidhar

    Muralidhar Guest

    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
     
    Muralidhar, Sep 1, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. shruds
    Replies:
    1
    Views:
    882
    John C. Bollinger
    Jan 27, 2006
  2. Marcus
    Replies:
    0
    Views:
    493
    Marcus
    Oct 6, 2008
  3. M Wells
    Replies:
    0
    Views:
    144
    M Wells
    Oct 6, 2004
  4. unixfreak compiler

    element position inside scrollable div tag

    unixfreak compiler, Feb 17, 2006, in forum: Javascript
    Replies:
    0
    Views:
    143
    unixfreak compiler
    Feb 17, 2006
  5. visu
    Replies:
    4
    Views:
    318
Loading...

Share This Page