Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer File Manager with Javascript

    Hello,

    I am trying to include a FileManger part in a HTML webpage by using Javascript and ActiveX.
    Basically it would be a normal page where I would call the ActiveXObject "Shell.Application" and then have a functionality similar to the one used in the BrowseForFile method.
    http://msdn.microsoft.com/library/de...hell/shell.asp

    The only problem is that the BrowseForFile method opens up a dialog box and would need it to open in an IFrame inside my webpage
    (have a regular HTML page that displays in a corner the contents of a folder on a share and from where you can copy paste files).
    Is such thing possible?Or is there an alternate solution apart from this ActiveX,that could provide the same functionality ( by only using client side code - I found something done in php).

    Thank you,
    Monica

  • #2
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Well, javascript isn't exactly meant for this sort of thing. If you did have access to server side you could use AJAX.
    Omnis mico antequam dominus Spookster!

  • #3
    New Coder
    Join Date
    Jan 2007
    Posts
    93
    Thanks
    0
    Thanked 0 Times in 0 Posts
    probably could be done if roll your own code.

    Starting with get sub folders, get all files etc.

    fso = new ActiveXObject("Scripting.FileSystemObject");
    n = fso.GetFolder(mycurrentfolder);
    e = new Enumerator(n.SubFolders);
    for (;!e.atEnd();e.moveNext())
    {
    x = e.item();
    document.getElementById('destfolder').options[i]= new Option (x, x); //example that adds the folders to a <select>
    i++
    }

    x is a folder objt so x.name gets you it's name without path.
    Last edited by tonyp12; 01-31-2007 at 07:23 PM.

  • #4
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AJAX will do :)

    Hello,

    I actually need to be able to read the contents of an NT share - so an Ajax approach of this would be fine as well.
    I don't only need to be able to iterate through folders - but also copy/paste files.As I said - very similar to a file manager opened by the BrowseForFolder method in the Shell Object.

  • #5
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Although I don't see why you just don't leave this down to the shell in the first place. What's wrong with \\server\share and letting explorer handle it?
    Omnis mico antequam dominus Spookster!

  • #6
    New to the CF scene
    Join Date
    Jan 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello,

    I must admit that indeed, that is the most simple aproach but it only works properly in IE - it has some issues when attempting to open a file from a folder in Firefox and also displays a "Index of" title.
    So I am trying to see if there is a workaround this.
    If not, I will probabilly use it - the issue here is to fine tune a feature.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •