This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Flex and the fly likes How will open a downloaded file without saving Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "How will open a downloaded file without saving" Watch "How will open a downloaded file without saving" New topic
Author

How will open a downloaded file without saving

Pramod Mehta
Greenhorn

Joined: Apr 26, 2011
Posts: 1
I am newly in Flex. I am facing following problem
At the time of download the file only Yes and No Button is coming in Alert box. I want 1 more button Open bcz I want to open downloaded file without saving.

So how will it happen ?

If anyone knows please reply.

Thanks in advance.


My code is as follows

private function downloadResultHandler(event:ResultEvent):void
{

ba=event.result as ByteArray;
if (ba == null)
Alert.show("Unable to download file", "Download Failed", Alert.OK, this);
else
Alert.show("Do you want to Save the file " + fileNameLbl.text, "Confirm Download", Alert.YES | Alert.NO , this, confirmHandler);

}

private function confirmHandler(e:CloseEvent):void
{
if (e.detail == Alert.YES)
{
downloadFileRef=new FileReference();
downloadFileRef.save(ba, fileNameLbl.text);



}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How will open a downloaded file without saving
 
Similar Threads
Open pdf from Explorer
problem with MAC OS and Servlet
Counting Number of downloads of Static file
How to call JSP page from Flex
File download problem