How to open a window as Tab from a sub window ?

Hi,
I mean, I want to create a button on a sub window and if I click it, it can open a new external window. How Can I do?

I tried

"
getMainWindow().executeJavaScript(“window.open(‘http://www.google.com/’, ‘_blank’)”);
" It shows sub-window cannot execute JavaScript
and
"
getMainWindow().open(new ExternalResource(LinkButton.this.url), “_blank”);
"
also not work.

What should I do?

Thank you very much!