Hi, I have two images, one looks like the up arrow button of a vertical scrollbar and the other looking like the down arrow button of a vertical scrollbar.

I want that when an user clicks on the up arrow button the contents of a table to scroll up and when the down arrow button is clicked the contents of the table to go down.

Please help!!!!!!!!!
Thanks in advance
Saswati

do you want the contents to move one click at a time or similiar to a scroll bar. if a scrollbar. why not use a <div style="overflow:scroll;"></div>

im guessing you could do an

<head>
  <script language='javascript'>
    function move(amount) {
      val margin = document.getElementById('content').style.marginTop();
      amount = parseFloat(margin) + amount;
      document.getElementById('content').style.marginTop= amount.toString() + 'px';
}
  </script>
</head>
<body>
  <p><a href="#" onclick="move(5)"><img src="up"></a>
  <a href="#" onclick="move(-5)"><img src="up"></a></p>

  <table>
    <tr>
      <td id="content"><p>blah blah</p></td>
    </tr>
  </table>
</body>

this is untested so i dunno but i rekon thats a basis of what you should do.

hope it helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.