X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fxmlhttp.html;h=b2f265afbb6bc03c9faddf10bc50f5f58eb0e737;hp=28130e501dfa3829e175535390764027334281af;hb=37e92c220a54636ebc7900cd59ec6ce56790ede8;hpb=705fca9417351f1fb86304ad95e33f61fb491587 diff --git a/httemplate/elements/xmlhttp.html b/httemplate/elements/xmlhttp.html index 28130e501..b2f265afb 100644 --- a/httemplate/elements/xmlhttp.html +++ b/httemplate/elements/xmlhttp.html @@ -1,51 +1,43 @@ -<% - 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 + 'skip_empty' => '1', # When the given key value is null or = 0, + # skip making a useless http request - +<%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'; + +