JavaScript web folder access password protected

My concept here is, I will upload files on my website via FTP e.g. www.mywebsite.com/dropbox/

And then I will share that URL with others, they can view the folder contents only if they can enter correct password.

Can this be done with JavaScript alone or will require another framework !

I know basics of JS and NODEjs.

Im looking for something like this, but no other fancy stuff http://www.filefactory.com/f/6ba85c1e889f59d4

You will have to protect the password, which you can't do via javascript. JS is downloaded to the client and is visible to anyone. You really need some kind of server based logic to accept user input and then validate their password against yours..In ASP.Net you could post it to a webmethod and compare it to either a hard coded value in the code or via a value in a database table (stored on the server). If the user's password and the hard coded value are a match then return True to enable the content.