Hello,
I have searched for hours with no luck in finding the code that will let me scroll to the bottom of a web page that I navigated to using shell.explorer.2 activex. The web page that the end user navigates to is long. The info that is related to the user is at the end of the page. I navigate using Thisform.owB.Navigate(lcUrl) and wait till it is not busy and readystate = 4 and then I could not figure out the code to display / scroll to the bottom of the web page in the IE activex window.
Please any help will be appreciated.
Thank you,
Abe
Uh, shell explorer is something different than the Web Browser control. Are you talking about the WebBrowser control?
In the WebBrowser control, once the document is loaded you can use the scrollTop
property on the document or body (can't recall which) to set the scroll position. Set it to a very large value and it'll scroll to the end.
loBrowser.Document.Body.scrollTop = 999999
Note this will work in IE 10/11 mode, but may not in older versions (7 is the default) and you may have to force your application to run in IE 11 mode.
+++ Rick ---
Hi Rick,
I have tried: Thisform.owb.Document.Body.scrollTop = 999999
did not work then I tried:
Thisform.owb.Document.documentElement.scrollTop = 999999
IT WORKED!!!
Thank you so much Rick for all your help through out the years 😃
Best Regards,
Abe