window.open is a very usefull jQuery method to open a new tab window in the browser. Using window.open method we can also open browser window of specific size.

<script type="text/javascript">
  function showIndex() {
    window.open("${g.createLink(controller: 'dashboard', action: 'index')}", '', 'width=400,height=300');
  }
</script>

If we call above jQuery method then it will make a request to dashboard/index and show the response in a new window of width 400 and height 300.

We can also show static data in the window.

<script type="text/javascript">
  function showData() {
    myWindow = window.open('', '', 'width=400,height=300');
    myWindow.document.write("Manish Kumar Bharti @JellyFish Technologies");
    myWindow.focus();
  }
</script>

If you are making ajax call and want to show data in this window then

<script type="text/javascript">
  function showIndex() {
    jQuery.ajax({
      url: "${createLink(controller: 'dashboard', action: 'index')}",
        success: function (data) {
          myWindow = window.open('', '', 'width=400,height=300');
          myWindow.document.write("Ajax Response = " + data);
          myWindow.focus();
      }
    });
  }
</script>