Im using something like this:
new ClickHandler() {
public void onClick(ClickEvent event) {
DOM.setElementAttribute(RootPanel.get("__download")
.getElement(), "src", GWT.getModuleBaseURL() +
"downloadAttachmentServlet?attachment_name="
+ a.getName() + "&folder_name=" + folder +
"&message_uuid=" + uid + "&sessionId=" + sessionUid);
}
});
And add this to the body of your html page:
<iframe src="" id="__download" style="width:0;height:0;border:0"></iframe>
Works on IE/Firefox/Safari.
Bye,
Norman
2009/8/6 Charlie <[email protected]>:
>
> Well maybe someone can answer this one for me:
> I have this button when it's clicked I want a "Save as" dialog box to
> show,
> I used Window.open in the ClickHandler and it worked great, a window
> opened and then a the "save as" dialog box showed, BUT when I added an
> http request to that ClickHandler IE acted with a popup blocker.
>
> Any idea why?
>
>
> On Aug 6, 4:41 pm, jhulford <[email protected]> wrote:
>> Just use a standard link. If the content type header on the response
>> from the download page is set to something other than html/xml you'll
>> get the browser's file save/execute dialog and it won't navigate away
>> from the current page.
>>
>> On Aug 5, 8:16 pm, Charlie <[email protected]> wrote:
>>
>>
>>
>> > Hello
>> > Right now I'm using "Window.open" function in order for the user to
>> > download files from my web-app but this leads to the internet exploer
>> > do the block bar and when you enable it , it refreshes the page is
>> > there any way to avoid this? I searched around but couldn't find
>> > anything that works.
>>
>> > Charlie- Hide quoted text -
>>
>> - Show quoted text -
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---