Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F4490
ajax.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ajax.js
View Options
/*
* Copyright (C) 2016 Virgo Venture, Inc.
* @%@~LICENSE~@%@
*/
function
ajaxLoad
(
url
,
fn
)
{
if
(
window
.
XMLHttpRequest
)
{
var
ajax
=
new
XMLHttpRequest
();
ajax
.
onreadystatechange
=
fn
;
ajax
.
open
(
"GET"
,
url
,
true
);
ajax
.
send
(
null
);
return
ajax
;
}
else
if
(
window
.
ActiveXObject
)
{
var
ajax
=
new
ActiveXObject
(
"Microsoft.XMLHTTP"
);
if
(
ajax
)
{
ajax
.
onreadystatechange
=
fn
;
ajax
.
open
(
"GET"
,
url
,
true
);
ajax
.
send
();
return
ajax
;
}
}
return
false
;
}
function
ajaxLoadAll
(
nodes
,
fn
)
{
if
(
window
.
XMLHttpRequest
)
{
var
ajaxes
=
[];
Array
.
prototype
.
forEach
.
call
(
nodes
,
function
(
node
)
{
var
ajax
=
new
XMLHttpRequest
();
if
(
ajax
)
{
ajax
.
onreadystatechange
=
fn
(
ajax
,
node
);
ajax
.
open
(
"GET"
,
node
.
getAttribute
(
"href"
),
true
);
ajax
.
send
(
null
);
}
});
return
ajaxes
;
}
else
if
(
window
.
ActiveXObject
)
{
var
ajaxes
=
[];
Array
.
prototype
.
forEach
.
call
(
nodes
,
function
(
node
)
{
var
ajax
=
new
ActiveXObject
(
"Microsoft.XMLHTTP"
);
if
(
ajax
)
{
ajax
.
onreadystatechange
=
fn
(
ajax
,
node
);
ajax
.
open
(
"GET"
,
node
.
getAttribute
(
"href"
),
true
);
ajax
.
send
();
}
});
return
ajaxes
;
}
return
false
;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Sep 15, 10:57 PM (5 d, 16 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3683
Default Alt Text
ajax.js (1 KB)
Attached To
Mode
rIOVAR Web Platform
Attached
Detach File
Event Timeline
Log In to Comment