I think its only possible if you do the scrolling yourself and do not rely
on the <a name=...> tag.
You can probably do something like (untested):
anchor.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
Widget jumpTo = getWidgetYouWantToScrollTo();
jumpTo.getElement().scrollIntoView(); //Version 1
scrollPanel.setVerticalScrollPosition(jumpTo.getElement().getOffsetTop());
//Version 2
Window.scrollTo(0, jumpTo.getElement().getOffsetTop()); //Version 3
}
});
-- J.
Am Dienstag, 13. März 2012 22:29:14 UTC+1 schrieb mars:
>
> hi,
>
> my gwt page has link within itself, like normal html page
> <a href="#b">B</a>
> point to
> <a name="b"></a>
> <h3>B</h3>
>
> within the same page, but i don't want to update the
> history stack by appending '#b' to the end of url. how can
> i do that? I used anchor instead of hyperlink.
>
> thanks.
>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/Pjr2DKiAgUsJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.