How to make a button link to another html page?
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
//this code has to redirect to another page within the project
}
How to make a button link to another html page?
button.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
//this code has to redirect to another page within the project
}
The question is tagged as GWT so based on that... to do it entirely on the client, you can use the com.google.gwt.user.client.Window
class.
Window.open(linkURL, "_self", "");
Look under gwt javadocs for the Window class. There are some static members in the Window class.
The open function is the same as that in javascript:
Window.open(url, targetFrame, features )
In GWT, "_self" is the name of the current active display frame/window.
Location replace, just as in javascript:
Window.location.replace(url)
Display alert or confirm window:
Window.alert(msg)
Window.confirm(msg)