summaryrefslogtreecommitdiff
path: root/httemplate/elements/rs_init_object.html
blob: 3bb0b4279ec77198c606f0119983c3abf355c241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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>