Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

SETUP:

Using Google Apps Script's UI (doGet) with tabPanel option. At the bottom of each panel is a "previous" and "next" button to navigate through the tabs.

ISSUE:

When activating a navigation button the viewing area remains at the bottom of the screen.

QUESTION:

What code can be used to jump to the top of the screen? (i.e. window.scrollTo(0,0)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
253 views
Welcome To Ask or Share your Answers For Others

1 Answer

Unfortunately, there's no way to interact with the browser like this. But you can control the window scrolling if you wrap up all your GUI inside your own scroll panel, instead of using the browser's one.

Then, you can use the myScroll.setScrollPosition(y).setHorizontalScrollPosition(x).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...