By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,213 Members | 1,328 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,213 IT Pros & Developers. It's quick & easy.

How to create a search box that opens up folders and files in HTML?

P: 1
I want to know how I can create a RESPONSIVE (that resizes according to devices) search box in HTML, CSS, & JavaScript, etc that opens up folders and files according to the value that the user inputs. It would be helpful if you can provide me with the full code. I will demonstrate a small example using images that I created using image processing software, so you can fully understand my question.


What the result should be; when the user inputs the value “2” in the “text1” field, the search box should select the “…/webpage/2” directory. And when the user inputs the value “1” in the “text2” field the search box should select the folder/file that is inside the folder which is selected by “text1” field, i.e. “…/webpage/2/1.html”. (There should be some relationship between the “text1” and “text2” fields). Also, there should be maximum values determined for the search of the text fields: for "text1" 1-114 number and in "text2" 1-286 number. Please provide me with full code and if any clarification is needed please reply.

The current sample code for my search box
Expand|Select|Wrap|Line Numbers
  1. <html>
  2.     <head></head>
  3.     <body>
  4.     <div class="input-group">
  5.       <!-- the "text1" field as displayed in the image -->
  6.         <input type="text" class="form-control" placeholder="enter chapter no"/>
  7.         <span class="input-group-addon"></span>
  8.       <!-- the "text2" field as displayed in the image -->
  9.         <input type="text" class="form-control" placeholder="enter verse no"/>
  10.         <span class="input-group-addon"></span>
  11.       <!-- the "button" field as displayed in the image -->
  12.         <button type="submit"><i class="fa fa-search">GO</i></button>
  13.     </div>
  14.  
  15.     </html>
4 Weeks Ago #1
Share this Question
Share on Google+
3 Replies


Banfa
Expert Mod 5K+
P: 8,959
We do not provide "full code" solutions. If you are having a problem with your own implementation we will be happy to help you work on solving those problems.
4 Weeks Ago #2

P: 20
For security reasons, modern browsers will not allow you. But this can be achieved using Filesystem Object in javascript. The browser that seems to support this is internet explorer.
1 Week Ago #3

P: 39
I humbly do not agree with Otekpo Emmanuel's mention of Microsoft Internet Explorer as anything other than a negative.

The following does not apply to FTP (File Transfer Protocol) and similar.

The following only applies to writing a web page html that in and of itself accesses a user's hard drive. ONLY that.

In the past I used IE a lot. It was powerful and potentially secure. I do not now consider it secure. But, if you use Microsoft Windows 10 directly for internet activities then you might as well use IE with it, and some might say that is the same as leaving your house door unlocked and placing a big "Everyone invited under all conditions" sign in front of your house in London England.

For the general public (at this time):
Current common way to "create a search box that opens up folders and files in HTML" is limited to either your own computer or if you have some special software installed on the user's computer which overrides the browser's security. In other words, if you do not know how then I suggest that you do not even spend the months and maybe years learning how this is done. Other than learning about it, let it go. There are some extremely dedicated people working to stop anyone that is less knowledgeable than themselves from accomplishing what you are asking about. It is ok to ask. Such questions should be asked. You should research how this is done and learn how intense the general public is being blocked from doing it. Microsoft has back doors already built into every operating system past 7 sp1 that actively do this type of thing, but they do not want YOU to be able to do it. UEFI is designed to do this type of thing before the operating system even starts up. TPM (Trusted Platform Module) does this type of thing before the operating system even starts up. SSL does this type of thing and hides this type of thing from the general public but hackers can (if they know how) easily get into systems via SSL. Various other firmware do this type of thing. But, you the general public are actively, aggressively, pre-meditatedly, stopped or attempted to be stopped from doing this type of thing. Much of your internet bandwidth is used for this type of thing without your being told, but if you are not very knowledgeable about how it is done, then you might not get to do it in your entire lifetime. I suggest that you give up on actually doing this other than learning more about it. Learn. Know. But, for the general public, unless you are special or unless you have access to special, do not expect to be able to do this type of thing on your own in this lifetime unless you work for Google and have security clearance access to how they know what they know.

Good question.

You might do well to study this topic for the next few years intensely.

Thank you for asking.
1 Week Ago #4

Post your reply

Sign in to post your reply or Sign up for a free account.