diff options
author | Ivan Kohler <ivan@freeside.biz> | 2013-08-25 16:23:30 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2013-08-25 16:23:30 -0700 |
commit | 8304269447c99cf0257da59f34046fc89c8e5caf (patch) | |
tree | dc4d40faaf71a29c1a3013b59afd14944e27e1d0 /httemplate/elements/rs_init_object.html | |
parent | c14b35ce12141287e201bba8489b202a1b34b38f (diff) |
only define function once
Diffstat (limited to 'httemplate/elements/rs_init_object.html')
-rw-r--r-- | httemplate/elements/rs_init_object.html | 12 |
1 files changed, 11 insertions, 1 deletions
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 &> </%doc> +<%shared> +my $initialized = 0; #won't work if component is "preloaded"... so don't do that +</%shared> +% if ( ! $initialized++ ) { <SCRIPT TYPE="text/javascript"> function rs_init_object() { @@ -27,3 +36,4 @@ Example: } </SCRIPT> +% } |