You have to appreciate that Perl/CGI is running on the web server whereas JavaScript runs inside the web browser, which means that JS can do these "instant" effects while Perl always needs to reload the page.
In any case, Perl/CGI uses a combination of HTML/CSS/JS to render its output in a web browser, and there are a few modules on CPAN that help you in producing this HTML/CSS/JS code.
I have not tested any of them, though. | [reply] |
Perl is a server-side language. JavaScript is a client-side language. For a tree widget you need JavaScript. Google, and ye shall find many readymade solutions. Wrt Perl, all you can do is use Perl to create the JavaScript. But why do that if it already exists? Well, you might want to pull info from a database to create a dynamic tree that is, then, controlled by JavaScript in the user's browser. That would be a good integration of server-side Perl and client-side JavaScript. | [reply] |