in reply to cgi and update event

HTML pages are static. Javascript makes them dynamic. So, you can't do it without javascript. I'm not familiar with that syntax, so you should look for ways that allow the construction of those .menu with additional attributes, other than name and values. Something like <& .menu, name => 'items_1', values => \@items1, other_attributes => "onChange = some_javascrit_code();" &>

Replies are listed 'Best First'.
Re^2: cgi and update event
by amarquis (Curate) on Mar 07, 2008 at 16:38 UTC

    To expand upon olus' explaination, the data structures that you have there get processed by Perl server side to produce the HTML. Once that HTML is sent to the user, it is just plain text being rendered by their browser, and the only way to do anything dynamic is with something client-side like Javascript.

    In addition to olus' solution, if you really want to do the processing grunt work in Perl and don't mind the slower user experience, you can write a relatively small amount of Javascript to re-query the server when a change is made.

      Or, if you don't want to write the JavaScript yourself, you can use CGI::Ajax to handle the interfacing between the HTML/JavaScript page and your server-side Perl.