views:

19

answers:

1

In order to achieve this effect, I would like to know how I can make the WebBrowser to scroll up when new content is added to the HTML page?

"Allow more entries to be displayed in the view: When the user clicks more, additional entries should be displayed in addition to the ones which are already displayed. The code should cause the UI to scroll such that the first entry of the "more" set is on top".

I am using com.ibm.rcp.browser.service.WebBrowser which is similar to SWT WebBrowser.

A: 
  • The click should do an AJAX call that adds data to the bottom of the page.
  • The first thing added (before the data) should be an anchor
  • The last thing should be a bit of javascript:

    document.location="thePage.htm#newdata"

This will cause the page to scroll to the new <a> tag.

egrunin