X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=e034388229e3237ba0af62f6d43ffa21f0ac7fec;hb=e65c6a26ca778166aec2b2d1dd3012ab84fa611a;hp=cf277fe1a29cc6827584ddf82d93d885ffd1bcab;hpb=e254aa061c5ae8b838ea2b5af2e96f6e6f843d59;p=freeside.git diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index cf277fe1a..e03438822 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -4,6 +4,7 @@ my $url = $opt{'url'}; my $method = exists($opt{'method'}) ? $opt{'method'} : 'GET'; #my @subs = @{ $opt{'subs'}; + my $key = exists($opt{'key'}) ? $opt{'key'} : ''; $url .= ( ($url =~ /\?/) ? '&' : '?' ) if $method eq 'GET'; @@ -38,10 +39,10 @@ %> - function <%=$func%>() { + function <%=$key%><%=$func%>() { // count args; build URL var url = "<%=$furl%>"; - var a = <%=$func%>.arguments; + var a = <%=$key%><%=$func%>.arguments; var args; var len; @@ -78,7 +79,7 @@ a[a.length-1](data); if ( data.indexOf("System error") > -1 ) { var w; - if ( w = window.open("about:blank") ) } + if ( w = window.open("about:blank") ) { w.document.write(data); } else { // popup blocking? should use an overlib popup instead