X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=2df3c42c9c8dc9423e5aeecf7d796be4ae0fae2f;hp=e034388229e3237ba0af62f6d43ffa21f0ac7fec;hb=43e42a04ae37ca7a84c05d9ff8b94d9f8cde6dcf;hpb=36d9b47e5c20ae3bc71c0bd0eaf289b566d0cf7c diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index e03438822..2df3c42c9 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -1,52 +1,38 @@ -<% - my ( %opt ) = @_; +<%doc> - my $url = $opt{'url'}; - my $method = exists($opt{'method'}) ? $opt{'method'} : 'GET'; - #my @subs = @{ $opt{'subs'}; - my $key = exists($opt{'key'}) ? $opt{'key'} : ''; +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'; + +