diff options
Diffstat (limited to 'httemplate/elements/rs_init_object.html')
-rw-r--r-- | httemplate/elements/rs_init_object.html | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/httemplate/elements/rs_init_object.html b/httemplate/elements/rs_init_object.html new file mode 100644 index 000000000..3bb0b4279 --- /dev/null +++ b/httemplate/elements/rs_init_object.html @@ -0,0 +1,29 @@ +<%doc> + +Example: + + include( '/elements/rs_init_object.html' ); + +</%doc> +<SCRIPT TYPE="text/javascript"> + + function rs_init_object() { + var A; + try { + A=new ActiveXObject("Msxml2.XMLHTTP"); + } catch (e) { + try { + A=new ActiveXObject("Microsoft.XMLHTTP"); + } catch (oc) { + A=null; + } + } + if(!A && typeof XMLHttpRequest != "undefined") + A = new XMLHttpRequest(); + if (!A) + alert("Can't create XMLHttpRequest object"); + return A; + + } + +</SCRIPT> |