The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> search directory for a file, search directory for a file
antamr904
post May 4 2012, 07:54 AM
Post #1





Group: Members
Posts: 8
Joined: 4-May 12
Member No.: 17,049



hi all,

i am very new to html and any web scripting lang so please be patient with me.

what i am trying to accomplish is:

i have a basic html page with a text box and a search button.

i would like for the user to type a computer name in the text box field then hit search

the search button would:

search a local directory called (inv) for a txt file named %computername%.txt on the web server then display the contents of that txt file in a iframe.

again i am very new to any type of web scripting language, please let me know if this can be accomplished any other way.

thank you in advance!!

here is what i have so far:

<html>
<body>
<center>
<h1>Computer Inventory</h1>
</center>
<br>
<br>
<br>
<h3>Search</h3>
Computer Name:
<br>
<input type="text" name="SearchInv" size="50">
<input id=runbutton class="button" type="button" value="Find" name="run_button" onClick="RunScript">
<br>
<h3>Here is the computers inventory:</h3>
<iframe src="inv/0171afaugno.txt" width="1000" height="500" align="left">



</body>

</html>


User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
pandy
post May 4 2012, 08:05 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



A site can't actively search the user's hard drive. If you mean a Browse button, it does just that, lets the use browse his own drive for files to upload. It's created with <input type="file"> .
http://htmlhelp.com/reference/html40/forms/input.html
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
antamr904
post May 4 2012, 08:09 AM
Post #3





Group: Members
Posts: 8
Joined: 4-May 12
Member No.: 17,049



QUOTE(pandy @ May 4 2012, 09:05 AM) *

A site can't actively search the user's hard drive. If you mean a Browse button, it does just that, lets the use browse his own drive for files to upload. It's created with <input type="file"> .
http://htmlhelp.com/reference/html40/forms/input.html


thank you for your reply.

i don't want to search the users hd, i want to search a local directory called (inv) on the iis server then display the contents of the txt file in a iframe.

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post May 4 2012, 12:11 PM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



Sorry, I misunderstood.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 10:55 PM