-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmaintenance.js
48 lines (41 loc) · 1.35 KB
/
maintenance.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
//function to process the auctioned items
function fnProcessAuctionItems()
{
var xHRObject = false;
if(window.XMLHttpRequest)
xHRObject = new XMLHttpRequest();
else if(window.ActiveXObject)
xHRObject = new ActiveXObject("Microsoft.XMLHTTP");
xHRObject.open("GET", "processAuction.php?id=" + Number(new Date), false);
xHRObject.onreadystatechange = function()
{
if (xHRObject.readyState == 4 && xHRObject.status == 200)
{
var htmlResponse = xHRObject.responseText;
document.getElementById("confirmation").innerHTML = htmlResponse;
}
}
xHRObject.send(null);
}
//Function to generate the revenuue using XSLT method
function fnGenerateReport()
{
var xHRObject = false;
if(window.XMLHttpRequest)
xHRObject = new XMLHttpRequest();
else if(window.ActiveXObject)
xHRObject = new ActiveXObject("Microsoft.XMLHTTP");
xHRObject.open("GET", "generateReport.php?id=" + Number(new Date), false);
xHRObject.onreadystatechange = function()
{
if (xHRObject.readyState == 4 && xHRObject.status == 200)
{
var htmlResponse = xHRObject.responseText;
if(htmlResponse.indexOf("<td>") > 0)
document.getElementById("report").innerHTML = htmlResponse;
else
document.getElementById("report").innerHTML = "No items for generating revenue";
}
}
xHRObject.send(null);
}