-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxx.js
51 lines (50 loc) · 1.21 KB
/
xx.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
/**
* @author xnny
*/
function ajaxget(url, showid, waitid, loading, display, recall)
{
waitid = typeof waitid == 'undefined' || waitid === null ? showid : waitid;
var x = new Ajax();
x.setLoading(loading);
x.setWaitId(waitid);
x.display = typeof display == 'undefined' || display == null ? '' : display;
x.showId = $(showid);
if(x.showId)
x.showId.orgdisplay = typeof x.showId.orgdisplay === 'undefined' ? x.showId.style.display : x.showId.orgdisplay;
if(url.substr(strlen(url) - 1) == '#')
{
url = url.substr(0, strlen(url) - 1);
x.autogoto = 1;
}
var url = url + '&inajax=1&ajaxtarget=' + showid;
x.get(url, function(s, x)
{
var evaled = false;
if(s.indexOf('ajaxerror') != -1)
{
evalscript(s);
evaled = true;
}
if(!evaled && (typeof ajaxerror == 'undefined' || !ajaxerror))
{
if(x.showId)
{
x.showId.style.display = x.showId.orgdisplay;
x.showId.style.display = x.display;x.showId.orgdisplay = x.showId.style.display;
ajaxinnerhtml(x.showId, s);
ajaxupdateevents(x.showId);if(x.autogoto) scroll(0, x.showId.offsetTop);
}
}
ajaxerror = null;
if(typeof recall == 'function')
{
recall();
}
else
{
eval(recall);
}
if(!evaled)
evalscript(s);
});
}