![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder General » View Thread |
Messages 1 to 3 of 3 total |
![]() |
Tue, Sep 10 2024 8:06 AM | Permanent Link |
Graeme Keast | Hi
My application uses a TBrowser component to download a file by using the following: Browser.URL:= 'GetPDFFile' where the URL returns, in my case, a PDF file. When the file has been downloaded I get the choice of either opening or saving the downloaded file or cancelling the request. Is there any way I can detect when the file has finished downloading, specifically when the user chooses Open, Save or Cancel. I need to do some processing at this point in time. I have tried all the events for the TBrowser component but it seems as though these events are never triggered. Thanks in advance Graeme |
Tue, Sep 10 2024 5:16 PM | Permanent Link |
erickengelke | Graeme Keast wrote:
> My application uses a TBrowser component to download a file by using the following: > Browser.URL:= 'GetPDFFile' > >where the URL returns, in my case, a PDF file. > Is there any way I can detect when the file has finished downloading, specifically when the user chooses Open, > Save or Cancel. I need to do some processing at this point in time. I have to ask more questions: Are you doing post processing in your Web application or in a different user program? Are you just putting up a message saying the file is downloaded? Do you want to view it in the TBrowser or do you want to save it to the filesystem? Erick EWB Programming Books and Nice Component Library See my EWB BLOG posts, at: http://www.erickengelke.com |
Tue, Sep 10 2024 5:41 PM | Permanent Link |
erickengelke | Graeme Keast wrote: > My application uses a TBrowser component to download a file by using the following: > Browser.URL:= 'GetPDFFile' > >where the URL returns, in my case, a PDF file. First off, don't try to support IE, the built-in browser in EWB. You may have to experiment. If you are in a bind, the following kludge returns PDF if the browser has loaded a PDF, it works in Safari, Chrome and Firefox. procedure TForm1.Timer1Timer(Sender: TObject); var s: string; v : variant; begin try v := Browser1.Document; s := Browser1.DocumentText; except s := 'unknown'; end; if ( v = nil ) or ( pos('pdf',s) > 0 ) then s := 'PDF' else s := 'empty'; Label1.Caption := s; end; EWB Programming Books and Nice Component Library See my EWB BLOG posts, at: http://www.erickengelke.com |
This web page was last updated on Thursday, June 12, 2025 at 07:42 PM | Privacy Policy![]() © 2025 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |