6 Replies Latest reply: Jul 19, 2012 9:47 AM by WolfShade RSS

    Server folder browser

    WolfShade Community Member

      Hello, everyone.

       

      I'm looking to put a folder browser for the server in a .cfm page (don't worry.. it will be secure access, not public access) similar to what is in CFAdmin for browsing folders (like in Collections and whatnot.)

       

      Has anyone seen or heard of code that will do this?

       

      Thanks,

       

      ^_^

        • 1. Re: Server folder browser
          Adam Cameron. Community Member

          Well... yes.  Like you said: the code in CFAdmin.  If that suits your purposes, why don't you just reuse the same control?

           

          --

          Adam

          • 2. Re: Server folder browser
            WolfShade Community Member

            I'd like to, but the CFAdmin files are encrypted and I don't know how to view the code.

             

            ^_^

            • 3. Re: Server folder browser
              Adam Cameron. Community Member

              You don't need to see the CFAdmin files, the file picker is a client side applet.  All you need to do is view the source of the page, and follow how the applet has been called...

               

              --
              Adam

              • 4. Re: Server folder browser
                WolfShade Community Member

                Thank you, Adam.  I'll give that a shot and report back.

                 

                ^_^

                • 5. Re: Server folder browser
                  Adam Cameron. Community Member

                  Thank you, Adam.  I'll give that a shot and report back.

                   

                   

                  Cool.  I hasten to add I've never tried this, but it looks fairly striaght fwd.  First things first, just lift the <applet> code striaght out of the page's source, stick it in your own form code and run it to make sure it works outwith the context of CFAdmin.

                   

                  --

                  Adam

                  • 6. Re: Server folder browser
                    WolfShade Community Member

                    Brilliant!  I had to (of course) copy/paste the .jar file into the same folder as the .cfm I'm working on and modify the location in the applet tag, and then tweak it a lot, but it's working!

                     

                    Also had to code javascript to pass along things like field name/id and other stuff, but it's working quite well.

                     

                    NOTE: I have two form fields that are utilizing this, and noticed that if you open both of them without closing the other, the most recent one opened is the only one that will work; the first one opened will not "select" anything.  So, in order to avoid this issue, I use javascript to "hide" the buttons when the popup is opened, then use javascript in the child window to "unhide" the buttons when the popup is either submit or canceled.

                     

                    Thank you for the suggestion, Adam!

                     

                    ^_^