X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=d0c7990953796562d3aaafa549bdd87abb070052;hb=6c4d9632f4d5cd1164ab9183932fbdf9137945aa;hp=6efc395f7a94eb3ccb667a6721dfa0dc9710b9f6;hpb=3ce7691203a7737406bf2d4442f7fd84b81f847e;p=freeside.git diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index 6efc395f7..d0c799095 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -1,17 +1,19 @@ -% -% 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'; -% -% +<%doc> + +Example: + 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'; + +