X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=e70871169145edae73e2e927c0ae5ecb0024270e;hb=1b3abef9815111c52b1370ba5168a592ae9cfcb0;hp=cf277fe1a29cc6827584ddf82d93d885ffd1bcab;hpb=e254aa061c5ae8b838ea2b5af2e96f6e6f843d59;p=freeside.git diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index cf277fe1a..e70871169 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -1,51 +1,41 @@ -<% - my ( %opt ) = @_; +<%doc> - my $url = $opt{'url'}; - my $method = exists($opt{'method'}) ? $opt{'method'} : 'GET'; - #my @subs = @{ $opt{'subs'}; +Example: - $url .= ( ($url =~ /\?/) ? '&' : '?' ) - if $method eq 'GET'; + include( '/elements/xmlhttp.html', + # required + 'url' => $p.'misc/something.html', + 'subs' => [ 'subroutine' ], -%> + # optional + 'method' => 'GET', #defaults to GET, could specify POST + 'key' => 'unique', #unique key - +<%init> +my ( %opt ) = @_; + +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'; + +