. This has created a bookmark that has been saved to a variable. Now, select another block of text on the page and then click here: . You now have two bookmarks stored in variables that can be retreived at any time.

An example application of this feature could be a content highlighter for your companies intranet. It would allow your employees to browse articles and highlight information that they found interesting. The bookmarks to this highlighted information could be stored in a database. The next time the user browsed to the page you would use moveToBookmark to "relight" that information.

Problems with getBookmark

The biggest problem with using getBookmark is any change that is made to the HTML on the page may cause unusual behaviour. Any content within a sentence of the content that has been changed will likely cause the moveToBookmark method to either select the incorrect text or not work at all. This is especially troublesome when using these methods with the MSHTML or DEC as the likelihood of the content having changed since you bookmarked it is quite likely.

MSDN Reference: getBookmark method
MSDN Reference: moveToBookmark method

Published March 30, 2003 · Updated September 17, 2005
Categorized as MSHTML and DEC
Short URL: http://www.shoppingpr.com/s/116

Conversation

2 Comments · RSS feed
cydiablo said on April 11, 2004

firstly,thanks for the example,but my problem is that when I saved the variable,and then open another file and then open the first again, error happens,as:movetobookmark in the variable,the method stopped and an error showed to me. What kind of problem is it? Thanks again.

Nathan said on November 10, 2004

Great stuff ... thanks :)

Sorry, comments are closed for this post. If you have any further questions or comments, feel free to send them to me directly.
99热这里只有精品国产,免费99精品国产自在现线,99国产这里有精品视频