Mr. North,
As we are a Microsoft shop I'n less concerned over the fact that this
is the first time I'm used Microsoft-only controls (though I do try to
remain agnostic as to the platform. We are using WinXP SP1 IE6.0.28)
and the Shell.BrowseFroFolder is working well - no access errors. The
website is configured for Windows Authentication (only) and the
web.config file provides the ASPNET_WP with impersonation rights.
As far as getting the Filepath back from the client without a second
roundtrip (the first was to initiate the image download via an asp
button click)... this bacame easy to accomplish with a bit of
JavaScript and a "hidden" HTML input field in the form.
So, while - yes, I'm not addressing the NS and Mozilla users (of which
we have none) the remainder of the image search/engine/gallery
upload/download works just fine.
Glenn
Jeff North <jn****@yourpantsbigpond.net.au> wrote in message news:<1e********************************@4ax.com>. ..
On 21 Sep 2004 04:29:37 -0700, in comp.lang.javascript
go****@nixonpeabody.com (Glenn Owens) wrote:
| Not true. As I mentioned I need a way to download a number of image
| files from a gallery-style image search engine to a directory
| destination of the user's choosing. Selecting each image with a
| right-click and specifying the directory would be unnecessarily
| tedious for the user.
The user only has to navigate to their folder once and it becomes the
default folder so subsequent downloads go to that folder. The user can
also rename the file if required.
| I did find a way to involk the BrowseForFolder activeX control through
| Javascript out on MSDN. So, I implemented, and tested, the control and
| that seems to be working well. Here's the Javascript that I'm using:
|
| function GetDownloadPath() {
| var frm = document.forms[0];
| var Shell = new ActiveXObject("Shell.Application");
| var Folder = new Object;
|
| Folder = Shell.BrowseForFolder(0, "Choose a download folder", 0);
|
| var FolderItem = new Object;
| FolderItem = Folder.Items().Item();
|
| document.all.item("lblFilepath").InnerText = FolderItem.Path;
| frm.lblFilepath.Text = FolderItem.Path;
| }
I get 'Permission Denied' error message (WinXP SP2 IE6.0.29)
Error: ActiveXObject is not defined (NS7.1 and Mozilla1.7)
| Now, my out question is how to get the client-side FilePath back to
| the server without a second round-trip to the server.
You can't.
---------------------------------------------------------------
jn****@yourpantsbigpond.net.au : Remove your pants to reply
---------------------------------------------------------------