-
Notifications
You must be signed in to change notification settings - Fork 0
/
ajax_imgcode.js
56 lines (50 loc) · 1009 Bytes
/
ajax_imgcode.js
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
var xmlHttp13
function imgcode()
{
xmlHttp13=GetXmlHttpObject()
if (xmlHttp13==null)
{
alert ("Browser does not support HTTP Request")
return false;
}
//var cc = document.frm.country_id.value;
var url = "ajax_imgcode.php"
url = url+"?sid="+Math.random()
xmlHttp13.onreadystatechange=stateChanged13
xmlHttp13.open("GET",url,true)
xmlHttp13.send(null)
return false;
}
function stateChanged13()
{
if (xmlHttp13.readyState==4 || xmlHttp13.readyState=="complete")
{
//alert("bdjbsjkd");
var mmm=xmlHttp13.responseText;
//alert(mmm);
document.getElementById("imgco").innerHTML=xmlHttp13.responseText
// window.location.href("home.html")
}
}
function GetXmlHttpObject()
{
var xmlHttp13=null;
try
{
// Firefox, Opera 8.0+, Safari
xmlHttp13=new XMLHttpRequest();
}
catch (e)
{
// Internet Explorer
try
{
xmlHttp13=new ActiveXObject("Msxml2.XMLHTTP");
}
catch (e)
{
xmlHttp13=new ActiveXObject("Microsoft.XMLHTTP");
}
}
return xmlHttp13;
}