perl file browser

Taavi Burns taavi-LbuTpDkqzNzXI80/IeQp7B2eb7JE58TQ at public.gmane.org
Thu May 6 15:33:47 UTC 2004


On Thu, May 06, 2004 at 01:42:12AM -0400, Madison Kelly wrote:
> >As long as the user keeps pressing forward (i.e. clicking links instead
> >of hitting the "Back" button), keeping state between screens is trivial
> >using the perl CGI modules.  It generally involves putting hidden values
> >in the form, so that the next time a link within that form is clicked,
> >those hidden values are sent along with the other visible form data
> >(i.e. the new input).
> 
> Humm, I never thought about using cookies to track file selections, sure 

Hidden values in the form have nothing to do with cookies.  Just FYI.

CGI::Session sounds like it's what you want, though (as per another poster's
suggestion)

> I am sure it won't be hard for a user to get used to clicking on the [+] 
> and [-] icon to the left of the file name or the filename itself to 
> cycle the directory's display. I might also (have to) build it so that 

You might also be able to use some of the DHTML extensions to load the
entire tree (or at least more of the tree) at once, and then just allow
the user to adjust his view of that tree without having to reload the
whole thing every time.  How well that would work depends on how fast the
'net connection will be and how big the tree is to begin with.

> whenever -anything- is clicked while selecting files the changes are 
> recorded. That might be cumbersome though if I need to use form for so 
> many things. I don't know much about cookies because I haven't needed 

Not really.  You just set hidden variables as appropriate.  You can set
new variables at a whim, and quite programatically, even to the point
of emulating an array by using one var for a count, and then vars with
some sequential naming scheme (itemCount, and item0, item1 ... item42).

> them up until now so I wonder how hard it would be to store changes 
> there until the user selects some sort of "commit" option?

As I said, trivial.  :)  Cookies or CGI::Session might require you to
do less footwork of your own, though.

-- 
taa

   Clarity of mind (C_m) is affected by any number,
   but by far the most important is horniness, which might be
   designated by \sigma, for obvious anatomical reasons that Waterhouse
   finds amusing at this stage of his emotional development.
      - Neal Stephenson, "Cryptonomicon"
/*eof*/
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list