On Nov 24, 4:03 pm, [EMAIL PROTECTED] (Steven Sim) wrote: > Gurus; > > I have written a Perl CGI script to dynamically generate HTML and > Javascript code for a web page. > > The web page consist of two parts. > > The first part displays a list of directories. > > The Javascript code that does this is dynamically generated by Perl. I > use Perl's opendir function to capture the directory elements into an > array and thus generate the JS script to display the user selectable > option from that array. > > Easy enough. > > The 2nd part is to display the list of files within the directory > selected in the first part. But at this stage, Perl has already competed > running. The entire page HTML and Javascript code has already been > displayed by Perl. > > Question becomes how I can use Perl to get the Javascript answer in the > first part and use it to dynamically generate the Javascript code for > the 2nd part? (without using a 2nd page).
Sounds to me like you should be looking at openthought. One of my local perlmongers gave a talk on this recently... http://perl.jonallen.info/talks/lightweightajax > (I don't really know JS very well and I cannot find any "file listing" > function in JS. If it does have such, it will solve all my problems.) JS running in a browser is not generally allowed to access the local filesystem. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/