From: Ivan Kohler Date: Sun, 25 Aug 2013 23:23:30 +0000 (-0700) Subject: only define function once X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=8304269447c99cf0257da59f34046fc89c8e5caf;p=freeside.git only define function once --- diff --git a/httemplate/elements/rs_init_object.html b/httemplate/elements/rs_init_object.html index 3bb0b4279..ec44d439a 100644 --- a/httemplate/elements/rs_init_object.html +++ b/httemplate/elements/rs_init_object.html @@ -1,10 +1,19 @@ <%doc> +The rs_init_object javascript function defined by this include instantiates and +returns a new object for XMLHTTP communication: on Microsoft browsers, an +ActiveXObject ("Msxml2.XMLHTTP" or "Microsoft.XMLHTTP"), or on other browsers, +an XMLHttpRequest object. + Example: - include( '/elements/rs_init_object.html' ); + <& /elements/rs_init_object.html &> +<%shared> +my $initialized = 0; #won't work if component is "preloaded"... so don't do that + +% if ( ! $initialized++ ) { +% }