Jump to content


Photo

User select a directory?


  • Please log in to reply
5 replies to this topic

#1 sammermpc

sammermpc
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 10 July 2006 - 08:49 PM

I feel like this should be simple, but I don't know how to do it.  I am creating a web database that  will have many files contained within large directories that need to be processed.  I wrote a PHP parser, processor, ect, that handles this no problem.  Now, all I want is for the user to be allowed to SELECT a directory.  Like the html [browse...] button, but allowing the user to select a directory.  Any ideas?

#2 ShogunWarrior

ShogunWarrior
  • Members
  • PipPipPip
  • Advanced Member
  • 528 posts
  • LocationIreland

Posted 10 July 2006 - 09:42 PM

I'd go with an AJAX browser that they can click through to get the directory.
<a href="http://www.daviddora...nmedia.com/">My New Site/Blog</a> | <a href="http://www.daviddora...m/check/">Check your page for broken links/images/scripts</a>

Zend Certified Engineer
Follow me on Twitter: http://twitter.com/davidd

#3 sammermpc

sammermpc
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 11 July 2006 - 06:31 PM

I have to go through all that just to get such simple functionality?  I mean, I could practically just have them select a file within a folder, and then chop off the file name.  Incredibly clumsy (and unacceptable for this application), but it would work.  In any case, the AJAX implementation would depend on sending the right HTTP headers correct?  In that case--what are they?

#4 sammermpc

sammermpc
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 12 July 2006 - 06:17 PM

Any other conventional solutions for this?  Or anyone who can point me in the right direction for doing this with AJAX?

#5 akitchin

akitchin
  • Staff Alumni
  • Advanced Member
  • 2,516 posts
  • LocationCalgary, AB, Canada

Posted 12 July 2006 - 06:21 PM

well my naive suggestion would be a select box which you populate with all the directories available.  are you asking how to get all the directories available, or do you already have those stored in a database?  i'm not too clear on what information you've already got to work with.

#6 sammermpc

sammermpc
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 12 July 2006 - 06:48 PM

No, I am entering information into a database.  This is the problem at hand.  A lab group goes out in the field with various instruments--they return a week later with literally hundreds of files from said instruments.  They then upload these from their laptops to a central server, which processes them, and stores data (time, date, location, ect...), in a database.

The question is, how can I let them simply select their data folders (ie../marine/data/07122006/), and then let the scripts do their work.  I have already written the batch processing, and it works if they type in the path by hand.  I want them to able to simply use a browse dialogue box, similar to the one <input type="file"..../> uses.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users