X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=2df3c42c9c8dc9423e5aeecf7d796be4ae0fae2f;hp=41965ace204c10acd5b0daf0838d7fdc77ae6898;hb=43e42a04ae37ca7a84c05d9ff8b94d9f8cde6dcf;hpb=76161f1a2ae0f96470bed4089b00eff5abb16cff diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index 41965ace2..2df3c42c9 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -1,79 +1,108 @@ -<% - my ( %opt ) = @_; +<%doc> - my $url = $opt{'url'}; - #my $action = exists $opt{'action'} ? $opt{'action'} : 'GET'; - #my @subs = @{ $opt{'subs'}; +Example: - $url .= ( ($url =~ /\?/) ? '&' : '?' ). - 'sub='; + 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'; + +