Welcome Guest Search | Active Topics | Sign In | Register

Scroll to top of Webview Options
KimKamp
Posted: Wednesday, March 21, 2018 10:14:57 AM
Rank: Advanced Member
Groups: Member

Joined: 3/13/2017
Posts: 33
Is it possible to have the Webview scroll to the top of the Webview with a command?

I have a webpage that is longer than the screen height on my computer. I would like to be able to move the mouse to the top of the Form that contains the Webview, and have the Webview scroll to the top of the webpage in the Webview.

Is this possible? If so, what code do I use?

Thanks!

Kim
eo_support
Posted: Wednesday, March 21, 2018 10:59:54 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
Hi,

You will need to use JavaScript to do that. The basic idea of our product is everything inside the brower engine, you do it with the browser engine's language -- JavaScript. Once you have the correct JavaScript code, you can use WebView.EvalScript to run it.

Thanks!
KimKamp
Posted: Wednesday, March 21, 2018 11:18:01 AM
Rank: Advanced Member
Groups: Member

Joined: 3/13/2017
Posts: 33
OK... Do you have samples of JavaScript code to accomplish this? Where can I get started to understand this?

Kim
eo_support
Posted: Wednesday, March 21, 2018 11:36:57 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,221
KimKamp wrote:
OK... Do you have samples of JavaScript code to accomplish this? Where can I get started to understand this?

Kim


No. We do not do that. JavaScript is a general Web page development topic and we do not provide support on that. So you will need to research online on how to do that. We only provide you the mean to call JavaScript code. You will need to work out the code itself. Basically, your original question "how to scroll a page with EO.WebBrowser" should be "how to scroll a page with JavaScript". You can search online for the later and you should be able to find plenty information on this.

You can find more information on how to call JavaScript code with EO.WebBrowser here:

https://www.essentialobjects.com/doc/webbrowser/advanced/js.aspx
KimKamp
Posted: Wednesday, March 21, 2018 11:50:04 AM
Rank: Advanced Member
Groups: Member

Joined: 3/13/2017
Posts: 33
Got it - Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.