Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Opening a new browser window

    How does one open a new *browser instance* on a menu click event. I am not able to locate this functionality with the Window api.

    Thanks.

    #2
    See com.google.gwt.user.client.Window.open(..).

    Comment


      #3
      Hi

      Originally posted by smartgwt.dev

      Is this really the recommended approach? I'm actually trying to throw away calls to Window.open() because of pop-up blockers. If a user clicks something to open a new window, the browser should natively open a new window, not JavaScript.

      Comment


        #4
        I tried using window.open..and it works fine with Firefox and chrome..But the window does not open in IE.I am setting the content-disposition as follows.

        response.setContentType("text/csv");
        response.setHeader("Content-Disposition", "attachment; filename=\"" +
        "sample.txt" + "\"");

        Any thoughts?

        Thanks

        Comment


          #5
          Ahh so love this issue. We use _self for browsers that aren't chrome, and _blank for Chrome. BUT of course IE sucks, so regardless if you go under Tools->Interenet Options->Security->Internet->Custom Level->Scroll to find Downloads, you hope things aren't disabled, but in many IT departments they do disable those options. So you've probably done as much as you can do. Otherwise show a prompt and tell the user to hold down CTRL while they perform the operation.

          Comment

          Working...
          X