blob: a8d9f1b216fc86673ea9ad868109811d02455bc9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
function track(pid)
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "/track", false);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("packageid=" + pid);
if (xmlhttp.status == 200) {
document.getElementById("dotrack").style.display = "none";
document.getElementById("dountrack").style.display = "inline";
}
}
function untrack(pid)
{
xmlhttp = new XMLHttpRequest();
xmlhttp.open("POST", "/untrack", false);
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
xmlhttp.send("packageid=" + pid);
if (xmlhttp.status == 200) {
document.getElementById("dountrack").style.display = "none";
document.getElementById("dotrack").style.display = "inline";
}
}
|