Home > Blockchain >  Display list of folders on the HTML Page
Display list of folders on the HTML Page

Time:10-26

What Javascript/HTML Code can be used to display the list of folders in a directory on an html page? Can Javascript do this? What I'd ultimately like to do is display the Users the web page, then filter them in a search. Right now I'm just trying to display them. Just the folders, not the contents.

Main Folder
User 1
User 2
User 3

I wasn't able to do this through a batch file and node isn't installed. Do I need Node to do this? If it needs to be done in a batch file, how can I run the batch file from Javascript?

CodePudding user response:

Answer below is only for frontend. I don't know what you want with bash and JS. Please explain that a bit more in details.

For the tree structure there is a tutorial on w3schools treeview.

There is also a tutorial on search bar on w3schools search bar.

And for these two elements to work together you will need to know some basic JS. Here is similar example on CodePen.

<div >
    <div id="treeview"></div>
    <div >
        <div >Options</div>
        <div >
            <span>Search mode</span>
            <div id="searchMode"></div>
        </div>
    </div>
</div>

CodePudding user response:

Thank you, this is a big help. I'm trying to create a webpage with a search box and a button.

  1. I have a large list of users in a directory and I need to be able to find certain users using a search box. This is where the search box comes in.

  2. Once I find the user with the search box, I need some way to create a shortcut (similar to a desktop shortcut) in that user's (or list of users) folder to another directory. I'd like the shortcut to be created when they click the button.

Does that make sense?

  • Related