Re: Auto File Download
- From: JonWayn <JonWayn@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 4 Apr 2008 09:29:00 -0700
The click event is suppose to download a file from an unknown url, the file
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 knowing
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 run
a script stored on a remote server, given the name of the script? After
posting my initial message, I realized that the click method of that button
did not even do what it should. In the UI of IE, clicking the button would
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 shell
out to IE, rather than using the WebBrowser control in order to get things
going. It would still be nice though to find out if there is a way to get the
WB ctl to behave like an IE window
"Sheng Jiang[MVP]" wrote:
Check how the click event is handled and replace the button's onclick event.
with your own equivalent functions.
For more information about HTML element events, search for "Handling html
element 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 isis
initiated by a hyperlink, in which case, the url to the file is available
through the HRef property of the link. However, in this case, the process
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, openor
cancel. How can I get this file downloaded without the display of thisdialog?
Thanks for any help
- Follow-Ups:
- Re: Auto File Download
- From: Sheng Jiang[MVP]
- Re: Auto File Download
- References:
- Auto File Download
- From: JonWayn
- Re: Auto File Download
- From: Sheng Jiang[MVP]
- Auto File Download
- Prev by Date: Re: Auto File Download
- Next by Date: Re: modify html code on the fly
- Previous by thread: Re: Auto File Download
- Next by thread: Re: Auto File Download
- Index(es):