Re: Auto File Download
- From: "Sheng Jiang[MVP]" <sheng_jiang@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 7 Apr 2008 09:47:49 -0600
Write your script-equivalent code to get the corrent URL generated then use
wininet to download it.
For more information about accessing the Dynamic HTML (DHTML) Object Model,
see http://msdn2.microsoft.com/en-us/library/bb508515(VS.85).aspx
--
Sheng Jiang
Microsoft MVP in VC++
"JonWayn" <JonWayn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:4A3CFD63-1D25-4D9C-8525-E0A7853F9543@xxxxxxxxxxxxxxxx
The click event is suppose to download a file from an unknown url, thefile
having an unknown name until the click event is handled. In other words,each
time you download a file, a very arcane name is generated. Without knowingrun
where the file is coming from (all that information is packeged in a java
script), and the file name, I dont know how to add my own custom
functionality to the button. I can see the script name. Is there a way to
a script stored on a remote server, given the name of the script? Afterbutton
posting my initial message, I realized that the click method of that
did not even do what it should. In the UI of IE, clicking the button wouldshell
pop the File Download dialog with Open/Save/Cancel options. However, Using
GetElementById to return a reference to the button and then applying the
click method of that button in codes, does nothing. I eventually had to
out to IE, rather than using the WebBrowser control in order to get thingsthe
going. It would still be nice though to find out if there is a way to get
WB ctl to behave like an IE windowevent
"Sheng Jiang[MVP]" wrote:
Check how the click event is handled and replace the button's onclick
htmlwith your own equivalent functions.
For more information about HTML element events, search for "Handling
iselement events"
--
Sheng Jiang
Microsoft MVP in VC++
"JonWayn" <JonWayn@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E52AADB3-0007-49BA-80E4-817F4570809D@xxxxxxxxxxxxxxxx
I am using VBA with MSAccess and the webbrowser control to download afile. I
have successfully done this numerous times when the download process
availableinitiated by a hyperlink, in which case, the url to the file is
processthrough the HRef property of the link. However, in this case, the
openis
initiated by a button, which has no property that tells the URL of thefile.
Clicking this button pops a modal dialog giving the options to save,
or
cancel. How can I get this file downloaded without the display of thisdialog?
Thanks for any help
.
- References:
- Auto File Download
- From: JonWayn
- Re: Auto File Download
- From: Sheng Jiang[MVP]
- Re: Auto File Download
- From: JonWayn
- Auto File Download
- Prev by Date: Re: WebBrowser Control - BeforeNavigate2, HTTPXML Requests (AJAX)
- Next by Date: webbrowser in thread ?
- Previous by thread: Re: Auto File Download
- Next by thread: modify html code on the fly
- Index(es):