-
Notifications
You must be signed in to change notification settings - Fork 0
/
aj.js
54 lines (38 loc) · 979 Bytes
/
aj.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
// JavaScript Document
var xmlhttp="";
if(window.XMLHttpRequest)
{
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
function suggest(str,field,divName)
{
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(divName).style.display='block';
document.getElementById(divName).innerHTML=xmlhttp.responseText;
setTimeout(10000);
}
}
xmlhttp.open("GET","call.php?q="+str+"&f="+field+"&dn="+divName,true);
xmlhttp.send();
}
function suggest_emp(str,field,divName)
{
xmlhttp.onreadystatechange=function()
{
if (xmlhttp.readyState==4 && xmlhttp.status==200)
{
document.getElementById(divName).style.display='block';
document.getElementById(divName).innerHTML=xmlhttp.responseText;
setTimeout(10000);
}
}
xmlhttp.open("GET","call.php?emp_q="+str+"&f="+field+"&dn="+divName,true);
xmlhttp.send();
}