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
30
| TINY={};
function T$(id){return document.getElementById(id)}
TINY.ajax=function(){
return{
call:function(u,d,f,p){
var x=window.XMLHttpRequest?new XMLHttpRequest():new ActiveXObject('Microsoft.XMLHTTP');
x.onreadystatechange=function(){
if(x.readyState==4&&x.status==200){
if(d){
var t=T$(d);
t.innerHTML=x.responseText
}
if(f){
var c=new Function(f); c()
}
}
};
if(p){
x.open('POST',u,true);
x.setRequestHeader('Content-type','application/x-www-form-urlencoded');
x.send(p)
}else{
x.open('GET',u,true);
x.send(null)
}
}
};
}(); |