-1) {
var s = source.indexOf("", e);
// Add to scripts array
scripts.push(source.substring(s_e+1, e));
// Strip from source
source = source.substring(0, s) + source.substring(e_e+1);
}
// Loop through every script collected and eval it
for(var i=0; i Return XMLHttpRequest (object) ...
function getXMLHttpRequest() {
var xmlhttp=null;
if (window.XMLHttpRequest && !document.all) // Non-IE
{
xmlhttp=new XMLHttpRequest();
}
else if(window.ActiveXObject) // IE
{
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
else if (window.opera) // Opera
{
xmlhttp=new XMLHttpRequest();
}
else
{
alert('SORRY, Ajax requests not supported by browser...');
}
return xmlhttp;
}
function sendXMLHttpPostRequest(divId, formId, url) {
var http = new XMLHttpRequest();
var content = document.getElementById(divId);
var form = document.getElementById(formId);
var params = getRequestBody(form);
content.innerHTML = '
';
http.open("POST", url, true);
//Send the proper header information along with the request
http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");
http.onreadystatechange = function() {//Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
content.innerHTML = parseScript(http.responseText);
}
}
http.send(params);
}
function sendXMLHttpGetRequest(divId, url) {
var http = new XMLHttpRequest();
var loader = '';
var content = document.getElementById(divId);
content.innerHTML = '
';
http.open("GET", url, true);
http.onreadystatechange = function() {//Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
content.innerHTML = parseScript(http.responseText);
}
}
http.send(null);
}
Резултати от търсенето
|
|
Галина Пеева - galina
|
|
E-I-W |
|
03.12.2011 17:38 |
|
"AIR" Project, 2009
Галина Пеева и Peter Maxian |
|
Посещения: 88
Гласували: 1
Оценка: Талант
|
известие (премести)