X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=2df3c42c9c8dc9423e5aeecf7d796be4ae0fae2f;hp=cf277fe1a29cc6827584ddf82d93d885ffd1bcab;hb=43e42a04ae37ca7a84c05d9ff8b94d9f8cde6dcf;hpb=e254aa061c5ae8b838ea2b5af2e96f6e6f843d59 diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index cf277fe1a..2df3c42c9 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -1,51 +1,38 @@ -<% - 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'; + +