%doc> Example: In misc/something.html:
<%init> my( $formname, $fields, $action, $url_or_message, $key ) = @_; $key = '' unless defined $key; my %dest_info; if ( ref($url_or_message) ) { #its a message or something %dest_info = map { $_ => $url_or_message->{$_} } grep { $url_or_message->{$_} } qw( message url popup_url error_url ); } else { # it can also just be a url %dest_info = ( 'url' => $url_or_message ); } my $progress_url = URI->new($fsurl.'misc/progress-popup.html'); $progress_url->query_form( 'jobnum' => '_JOBNUM_', 'formname' => $formname, %dest_info, ); my $all_fields = 0; my %copy_fields; if (grep '/^ALL$/', @$fields) { $all_fields = 1; } else { %copy_fields = map { $_ => 1 } @$fields; } #stupid safari is caching the "location" of popup iframs, and submitting them #instead of displaying them. this should prevent that. my $popup_name = 'popup-'.random_id(); %init>