45 users online (0 members and 45 guests)  


  Results 1 to 3 of 3

Related

  1. Replies: 2
  2. How Do I Create A Music Drop-down List?    Forum: HTML Forum
    Replies: 1
  3. Jump Menu covers drop down menu    Forum: HTML Forum
    Replies: 1
  4. Drop down menu    Forum: HTML Forum
    Replies: 6
  1. #1
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    Question create a drop down menu box in cgi

    right here we go I have tracking software that i am allowed to custom and have done the following

    the log file gets renamed everday to dayddmth.txt ie tue08jun.txt I now need to create a drop down box that will display all the files contained in a library on my server. so the stats can be checked at any time for any day.

    so i need help with the drop down menu (or list box) and how to read the contents of a directory or list all the files with .txt or some such thing.

    I have been to the forum from the guy who wrote the program but it seems he only answers certain questions or he hasn't got the time (what ever) this forum has been so helpful in the past would not have got this far without you.

    thanks
    George

  2. #2
    QuietDean's Avatar
    Administrator

    Status
    Offline
    Join Date
    Oct 2000
    Location
    Bournemouth, UK
    Posts
    2,662
    Hi,

    I'm not much cop at Perl, but google found a dir listing script:

    Code:
    #!/usr/bin/perl
    use File::Find;
    use File::Basename;
    
    @ARGV=qw(.) if not @ARGV;
    find(\&doit, @ARGV);
    
    sub doit {
       $fpath=$File::Find::name;
       $fname=basename($fpath);
       print "$fname $fpath\n";
    }
    Just change the print statement to be "<option>$fname $fpath</option"> and go from there.
    If one of our members helps you, please click the icon to add to their reputation!
    No support via email or private message - use the forums!
    Before you ask, have you Searched?

  3. #3
    digger's Avatar
    Junior Member

    Status
    Offline
    Join Date
    Jan 2005
    Posts
    36

    Thumbs up thanks

    will give a go thanks for your help



Tags for this Thread