Solved

html grid and scroll bar question

Posted on 2011-03-17
1
682 Views
Last Modified: 2012-08-14
I know very little about html and JS so please excuse the stupid question.

I have an application (written in Delphi/Intraweb) that produces a grid with a scrollbar.

I am not sure what type of object this is in the browser.  Perhaps it is two - I dont know.

However I would like to scroll the scrollbar to the top when a user clicks on a button.  Can this be done in JS?
0
Comment
Question by:soozh
1 Comment
 
LVL 4

Accepted Solution

by:
Finec earned 500 total points
ID: 35156744
If you want to scroll the full page, use this:

// horizontal 0 and vertical 0
window.scrollBy(0,0);

Open in new window


Or if it's in an overlayed div, give an id to the div, and use this:

document.getElementById('yourDivId').scrollTop = 0;

Open in new window

0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
This article discusses how to create an extensible mechanism for linked drop downs.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now