Hy, how to open a link in a new Browser Application ?
We can do something like this :
But, how to open (without human click) a new Page on a new Browser (tab) applications, from a Menu and MenuItem ? like this :
We can do something like this :
Code:
HTMLPane paneLink = new HTMLPane();
paneLink.setContents("<a href=\"http://google.com\" target=\"_blank\">Open Google</a>");
Code:
final Menu menu = new Menu();
MenuItem editItem = new MenuItem("Edit);
MenuItem viewItem = new MenuItem("View");
editItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler() {
public void onClick(MenuItemClickEvent event) {
SC.say("Try to redirect.");
// HOW TO REDIRECT IN NEW BROWSER PAGE ?...
String url = "http://forums.smartclient.com/showthread.php?t=";
int id = 4794;
// PAGE.OPEN.NEW.to(url+id);
}
});
menu.setItems(editItem , viewItem);
Comment