Solved

html grid and scroll bar question

Posted on 2011-03-17
1
687 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

636 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