473,549 Members | 2,329 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

filling a select box with a list of files


I'm looking for a perl script that can fill a "select" box (combo) from a
file listing in a particular directory. Can someone direct me to a script
that has already been written, or is this easy to do?

eg., if the directory contained the files: f1.txt and f2.txt, the select box
on the html page would have those files in the select box. If more files
were added to the particular directory, (upon refresh) the script would
automatically re-fill the select box with the new files.

Thanks for your help,
Jul 19 '05 #1
1 3560
brett wrote:
I'm looking for a perl script that can fill a "select" box (combo)
No idea what you are talking about here.
from a file listing in a particular directory. Can someone direct me
Just use glob() to get all the files in a given directory, trivial.
to a script that has already been written, or is this easy to do?

eg., if the directory contained the files: f1.txt and f2.txt, the

$files = glob ("*.txt");

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Sjaakie | last post by:
Hi there, I'm trying to get this working with Firefox. Can you point out what's wrong? No problems with IE, Firefox doens't fill selMonth... TIA >>> the script... >>> <select name="selDay" id="selDay" style="width:50;" ></select> - <select name="selMonth" id="selMonth" style="width:50;"></select> -
by: ramesh | last post by:
hi, I am using Com+ in my application. It will have InsertRecords,selectRecords,updateRecords function. In the Web Form i have Drop-down list. I want to select records from SQL and add it to this list. I know how to fill the data in the drop-down list. But i don't know how to pass this control to Com+. Do we need to pass like private...
by: crjunk | last post by:
I have a 3 table in my DataSet that I'm filling with data. After I've filled these 3 tables, I'm then trying to run a query that will fill a 4th table in the DataSet with data from the three tables that are already pouplated. When my code tries to fill the 4th table, ReportData, I receive the following error message: Invalid object name...
by: Joe Lester | last post by:
This thread was renamed. It used to be: "shared_buffers Question". The old thread kind of died out. I'm hoping to get some more direction by rephrasing the problem, along with some extra observations I've recently made. The core of the problem is that Postgres is filling up my hard drive with swap files at the rate of around 3 to 7 GB per...
by: Oliver Hauger | last post by:
Hello, In my html form I show a select-element and if this element is clicked I fill it per JavaScript/DOM with option-elements. I use the following code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head>
by: Joris De Groote | last post by:
Hi, I have a dropdownlist that contains should contain several values from the database, I fill it up in de page_load() with this code (at the end of the message) The code also adds a standard value, 'Selecteer een type' that should be added at the beginning of the list. The problem now is that when i start my application only the value...
by: mlarsen1982 | last post by:
Hello, I have a quick question regarding filling a list box. Basically I need some assistance for a starting point. I have a form with 4 radio buttons for the user to select, then press next. Depending on the radio button clicked, there are different customer numbers listed in the following forms list box. how might I go about starting...
by: bplantes | last post by:
Hi All, I am new to Access programming and it has been a long time since I have done any programming at all, so I am a bit rusty. I am building a form in Access 2002 that displays a list of Customers. When the form first opens, all Customers are displayed in a Listbox with the Address1, Address2, City, State, Zip, and Customer Number in...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.