X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0f179c9ab60ac22c697027cadc9f4bdb9c515ce5..a068401e5840f1748bd79afb0af6bd963badf3f1:/bin/mozilla/oe.pl diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index a5feea84a..5df518fc7 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -402,19 +402,18 @@ sub form_header { } } - my $onload = ""; + my $dispatch_to_popup = ''; if ($form->{resubmit} && ($form->{format} eq "html")) { - $onload = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';"; - $onload .= "document.do.submit();"; + $dispatch_to_popup = "window.open('about:blank','Beleg'); document.oe.target = 'Beleg';"; + $dispatch_to_popup .= "document.do.submit();"; } elsif ($form->{resubmit}) { # emulate click for resubmitting actions - $onload = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; - $onload .= "document.oe.submit();"; + $dispatch_to_popup = "document.oe.${_}.click(); " for grep { /^action_/ } keys %$form; } elsif ($creditwarning) { - $onload = "alert('$credittext')"; + $::request->{layout}->add_javascripts_inline("alert('$credittext')"); } - $TMPL_VAR{onload} = $onload; + $::request->{layout}->add_javascripts_inline("\$(function(){$dispatch_to_popup})"); $TMPL_VAR{dateformat} = $myconfig{dateformat}; $TMPL_VAR{numberformat} = $myconfig{numberformat}; @@ -1459,8 +1458,6 @@ sub backorder_exchangerate { $form->header; print qq| -
- - - -