473,386 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Is there a way to stop the scrollintoview from scrolling back to top of document afte

I've seen this mentioned as "bug" and wondered if there is a better workaround. When using the webbrowser control, I open a document (navigate) then getElementByID, scrollintoview. It does that then immediately goes back to top of the document. If I insert a message box, it does not.

This works but what an ugly hack:

Expand|Select|Wrap|Line Numbers
  1. Dim doc As HTMLDocument = WebBrowser.Document 
  2.  
  3. MsgBox("HOLD THE SCROLL!")
  4.  
  5. Dim myElem As HTMLElement = doc.GetElementById("idvalue")
  6. myElem.ScrollIntoView(True)
Apr 29 '14 #1
1 1743
Luk3r
300 256MB
Are you doing this on a Form_Load? I tested what you're saying and it worked fine for me without the message box.
Apr 29 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: peppeprof | last post by:
Hi- I need to use self.scrollTo(x,y) as the last action in a js function called by a onClick event. It seems that the scrolling actually takes place, but the document is then scrolling back to...
2
by: Martin Mrazek | last post by:
Hi, can I manipulate with scroll bars by JS in HTML? Something like ------------------ frame1 button1: ToLeft button2: ToRight ------------------ frame2
4
by: MLH | last post by:
On a data entry only form. lets say a user opens your form and enters 4 consecutive records. Each time, he clicks your SAVE button and a record is save and the record set is advanced to a newrec. ...
1
by: Patrick Delifer | last post by:
Is there a way to not let a page scroll back to the top if the user has scrolled down and the page is refreshed? Users are selecting Datagrid items and they are always brought back to the top when...
0
by: Do | last post by:
AFter updating a record in a datagrid, I know there is some code to write to get the page scrolled back to the same record position in the page. I saw this at a DevDays .NET conference. Anyone?...
2
by: Craig G | last post by:
i have a datagrid within a panel so that the user can scroll (vertically) the datagrid rather than page it the problem is that when i select (using select button within the datagrid) a record...
0
by: Al | last post by:
Hi, I am using large PictureBox inside a Panel, user can write on the PictureBox (it is actually InkPicture) but the problem that I have is regarding the Auto scrolling of the panel.. For...
0
by: =?Utf-8?B?YW1iZXI=?= | last post by:
Hello! I have a form that contains a tabcontrol, that is populated based on which record a user selects in a listbox on the form. I just added code to 'mytab.validating' so if the user tries to...
1
by: mark4asp | last post by:
How can I stop a post back from firing when there is no need for it to? I have a GridView pager template (shown below): There are 3 commands: ddlPager_SelectedIndexChanged - move the page to...
0
by: Tiger1 | last post by:
I’m having difficulty eliminating and tokenizing a .text file using nltk. I keep getting the following error message: AttributeError: 'list' object has no attribute 'lower'. I just can’t figure out...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.