Object.extend(Function.prototype, {
getArguments: function() {
var args = [];
for(var i=0; i<this.arguments.length; i++) {
args.push(this.arguments[i]);
}
return args;
}
}, false);
var MS = {"Browser":{}};
Object.extend(MS.Browser, {
isIE: navigator.userAgent.indexOf('MSIE') != -1,
isFirefox: navigator.userAgent.indexOf('Firefox') != -1,
isOpera: window.opera != null
}, false);
var AjaxPro = {};
AjaxPro.IFrameXmlHttp = function() {};
AjaxPro.IFrameXmlHttp.prototype = {
onreadystatechange: null, headers: [], method: "POST", url: null, async: true, iframe: null,
status: 0, readyState: 0, responseText: null,
abort: function() {
},
readystatechanged: function() {
var doc = this.iframe.contentDocument || this.iframe.document;
if(doc != null && doc.readyState == "complete" && doc.body != null && doc.body.res != null) {
this.status = 200;
this.statusText = "OK";
this.readyState = 4;
this.responseText = doc.body.res;
this.onreadystatechange();
return;
}
setTimeout(this.readystatechanged.bind(this), 10);
},
open: function(method, url, async) {
if(async == false) {
alert("Synchronous call using IFrameXMLHttp is not supported.");
return;
}
if(this.iframe == null) {
var iframeID = "hans";
if (document.createElement && document.documentElement &&
(window.opera || navigator.userAgent.indexOf('MSIE 5.0') == -1))
{
var ifr = document.createElement('iframe');
ifr.setAttribute('id', iframeID);
ifr.style.visibility = 'hidden';
ifr.style.position = 'absolute';
ifr.style.width = ifr.style.height = ifr.borderWidth = '0px';
this.iframe = document.getElementsByTagName('body')[0].appendChild(ifr);
}
else if (document.body && document.body.insertAdjacentHTML)
{
document.body.insertAdjacentHTML('beforeEnd', '<iframe name="' + iframeID + '" id="' + iframeID + '" style="border:1px solid black;display:none"></iframe>');
}
if (window.frames && window.frames[iframeID]) {
this.iframe = window.frames[iframeID];
}
this.iframe.name = iframeID;
this.iframe.document.open();
this.iframe.document.write("<"+"html><"+"body></"+"body></"+"html>");
this.iframe.document.close();
}
this.method = method;
this.url = url;
this.async = async;
},
setRequestHeader: function(name, value) {
for(var i=0; i<this.headers.length; i++) {
if(this.headers[i].name == name) {
this.headers[i].value = value;
return;
}
}
this.headers.push({"name":name,"value":value});
},
getResponseHeader: function(name, value) {
return null;
},
addInput: function(doc, form, name, value) {
var ele;
var tag = "input";
if(value.indexOf("\n") >= 0) {
tag = "textarea";
}
if(doc.all) {
ele = doc.createElement("<" + tag + " name=\"" + name + "\" />");
}else{
ele = doc.createElement(tag);
ele.setAttribute("name", name);
}
ele.setAttribute("value", value);
form.appendChild(ele);
ele = null;
},
send: function(data) {
if(this.iframe == null) {
return;
}
var doc = this.iframe.contentDocument || this.iframe.document;
var form = doc.createElement("form");
doc.body.appendChild(form);
form.setAttribute("action", this.url);
form.setAttribute("method", this.method);
form.setAttribute("enctype", "application/x-www-form-urlencoded");
for(var i=0; i<this.headers.length; i++) {
switch(this.headers[i].name.toLowerCase()) {
case "content-length":
case "accept-encoding":
case "content-type":
break;
default:
this.addInput(doc, form, this.headers[i].name, this.headers[i].value);
}
}
this.addInput(doc, form, "data", data);
form.submit();
setTimeout(this.readystatechanged.bind(this), 0);
}
};
var progids = ["Msxml2.XMLHTTP.6.0", "Msxml2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
var progid = null;
if(typeof ActiveXObject != "undefined") {
var ie7xmlhttp = false;
if(typeof XMLHttpRequest == "object") {
try{ var o = new XMLHttpRequest(); ie7xmlhttp = true; }catch(e){}
}
if(typeof XMLHttpRequest == "undefined" || !ie7xmlhttp) {
XMLHttpRequest = function() {
var xmlHttp = null;
if(!AjaxPro.noActiveX) {
if(progid != null) {
return new ActiveXObject(progid);
}
for(var i=0; i<progids.length && xmlHttp == null; i++) {
try {
xmlHttp = new ActiveXObject(progids[i]);
progid = progids[i];
}catch(e){}
}
}
if(xmlHttp == null && MS.Browser.isIE) {
return new AjaxPro.IFrameXmlHttp();
}
return xmlHttp;
};
}
}
Object.extend(AjaxPro, {
noOperation: function() {},
onLoading: function() {},
onError: function() {},
onTimeout: function() { return true; },
onStateChanged: function() {},
cryptProvider: null,
queue: null,
token: "",
version: "7.7.31.1",
ID: "AjaxPro",
noActiveX: false,
timeoutPeriod: 15*1000,
queue: null,
noUtcTime: false,
regExDate: function(str,p1, p2,offset,s) {
str = str.substring(1).replace('"','');
var date = str;
if (str.substring(0,7) == "\\\/Date(") {
str = str.match(/Date\((.*?)\)/)[1];
date = "new Date(" + parseInt(str) + ")";
}
else { // ISO Date 2007-12-31T23:59:59Z
var matches = str.split( /[-,:,T,Z]/);
matches[1] = (parseInt(matches[1],0)-1).toString();
date = "new Date(Date.UTC(" + matches.join(",") + "))";
}
return date;
},
parse: function(text) {
// not yet possible as we still return new type() JSON
// if (!(!(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(
// text.replace(/"(\\.|[^"\\])*"/g, ''))) ))
// throw new Error("Invalid characters in JSON parse string.");
var regEx = /(\"\d{4}-\d{2}-\d{2}T\d{2}:\d{2}.*?\")|(\"\\\/Date\(.*?\)\\\/")/g;
text = text.replace(regEx,this.regExDate);
return eval('(' + text + ')');
},
m : {
'\b': '\\b',
'\t': '\\t',
'\n': '\\n',
'\f': '\\f',
'\r': '\\r',
'"' : '\\"',
'\\': '\\\\'
},
toJSON: function(o) {
if(o == null) {
return "null";
}
var v = [];
var i;
var c = o.constructor;
if(c == Number) {
return isFinite(o) ? o.toString() : AjaxPro.toJSON(null);
} else if(c == Boolean) {
return o.toString();
} else if(c == String) {
if (/["\\\x00-\x1f]/.test(o)) {
o = o.replace(/([\x00-\x1f\\"])/g, function(a, b) {
var c = AjaxPro.m[b];
if (c) {
return c;
}
c = b.charCodeAt();
return '\\u00' +
Math.floor(c / 16).toString(16) +
(c % 16).toString(16);
});
}
return '"' + o + '"';
} else if (c == Array) {
for(i=0; i<o.length; i++) {
v.push(AjaxPro.toJSON(o[i]));
}
return "[" + v.join(",") + "]";
} else if (c == Date) {
// var d = {};
// d.__type = "System.DateTime";
// if(AjaxPro.noUtcTime == true) {
// d.Year = o.getFullYear();
// d.Month = o.getMonth() +1;
// d.Day = o.getDate();
// d.Hour = o.getHours();
// d.Minute = o.getMinutes();
// d.Second = o.getSeconds();
// d.Millisecond = o.getMilliseconds();
// } else {
// d.Year = o.getUTCFullYear();
// d.Month = o.getUTCMonth() +1;
// d.Day = o.getUTCDate();
// d.Hour = o.getUTCHours();
// d.Minute = o.getUTCMinutes();
// d.Second = o.getUTCSeconds();
// d.Millisecond = o.getUTCMilliseconds();
// }
return AjaxPro.toJSON("/Date(" + new Date(Date.UTC(o.getUTCFullYear(), o.getUTCMonth(), o.getUTCDate(), o.getUTCHours(), o.getUTCMinutes(), o.getUTCSeconds(), o.getUTCMilliseconds())).getTime() + ")/");
}
if(typeof o.toJSON == "function") {
return o
没有合适的资源?快使用搜索试试~ 我知道了~
Ajax.NET专业版
共97个文件
cs:86个
bat:4个
js:3个
需积分: 0 23 下载量 83 浏览量
2008-12-23
20:51:25
上传
评论
收藏 200KB ZIP 举报
温馨提示
Ajax.NET专业版是一个开源的ajax框架,对开发基于asp.net的ajax程序作用很大,灵活性也很强!
资源详情
资源评论
资源推荐
收起资源包目录
AjaxPro-32153.zip (97个子文件)
AjaxPro
build_2.0.bat 890B
Utilities
Utility.cs 20KB
AjaxSettings.cs 8KB
CacheInfo.cs 2KB
ClientMethod.cs 4KB
MD5Helper.cs 2KB
Constant.cs 2KB
AjaxPro.csproj 11KB
web.config 4KB
Handler
AjaxHandlerFactory.cs 8KB
ConverterJavaScriptHandler.cs 7KB
AjaxRequestModule.cs 3KB
TypeJavaScriptHandler.cs 10KB
Security
AjaxEncryption.cs 3KB
AjaxSyncHttpHandler.cs 3KB
HttpCompressionModule.cs 4KB
TypeJavaScriptProvider.cs 10KB
AjaxAsyncHttpHandler.cs 5KB
EmbeddedJavaScriptHandler.cs 6KB
AjaxProcHelper.cs 11KB
AjaxProcessors
XmlHttpRequestProcessor.cs 7KB
IFrameProcessor.cs 8KB
Managment
WebAjaxErrorEvent.cs 4KB
ms.js 3KB
JSON
JavaScriptDeserializer.cs 8KB
JavaScriptSerializer.cs 9KB
Converters
DataViewConverter.cs 3KB
IEnumerableConverter.cs 4KB
DataRowViewConverter.cs 3KB
DataSetConverter.cs 5KB
DataTableConverter.cs 7KB
ProfileBaseConverter.cs 4KB
IListConverter.cs 5KB
HashtableConverter.cs 6KB
EnumConverter.cs 4KB
PrimitiveConverter.cs 5KB
HtmlControlConverter.cs 7KB
GuidConverter.cs 3KB
NameValueCollectionConverter.cs 7KB
ExceptionConverter.cs 4KB
JavaScriptObjectConverter.cs 4KB
StringConverter.cs 4KB
DataRowConverter.cs 3KB
DecimalConverter.cs 4KB
IDictionaryConverter.cs 9KB
DateTimeConverter.cs 9KB
BitmapConverter.cs 8KB
JavaScriptConverterList.cs 12KB
JSONParser.cs 11KB
JavaScriptConverter.cs 2KB
JavaScriptObjects
JavaScriptSource.cs 3KB
JavaScriptObject.cs 5KB
JavaScriptString.cs 4KB
JavaScriptArray.cs 4KB
JavaScriptBoolean.cs 3KB
JavaScriptNumber.cs 7KB
JavaScriptUtil.cs 14KB
Interfaces
IJavaScriptConverter.cs 6KB
IJavaScriptObject.cs 2KB
build.bat 896B
build_json.bat 4KB
core.js 16KB
Security
WebEncrypter.cs 3KB
EncryptTransformer.cs 5KB
Decryptor.cs 3KB
Encryptor.cs 3KB
WebDecrypter.cs 3KB
Authentication.cs 4KB
DecryptTransformer.cs 3KB
Configuration
AjaxSettingsSectionHandler.cs 8KB
build_1.1.bat 641B
Attributes
AjaxNonSerializableAttribute.cs 2KB
AjaxNoTypeUsageAttribute.cs 2KB
JavaScriptConverterAttribute.cs 2KB
__AjaxClassAttribute.cs 2KB
__AjaxEnumAttribute.cs 2KB
AjaxNamespaceAttribute.cs 3KB
AjaxPropertyAttribute.cs 2KB
AjaxMethodAttribute.cs 7KB
AjaxCacheAttribute.cs 2KB
HttpSessionStateRequirement.cs 2KB
AjaxPro.csproj.vspscc 257B
AjaxPro.vssscc 256B
Web
UI
AjaxAutoComplete.cs 5KB
AjaxBasePage.cs 4KB
Services
AuthenticationService.cs 3KB
CartService.cs 2KB
ChatService.cs 2KB
ProfileService.cs 3KB
Interfaces
IAjaxProcessor.cs 8KB
IContextInitializer.cs 2KB
AjaxSecurityProvider.cs 3KB
IAjaxTokenProvider.cs 2KB
IAjaxKeyProvider.cs 2KB
IAjaxCryptProvider.cs 2KB
prototype.js 3KB
AssemblyInfo.cs 5KB
共 97 条
- 1
seven_xjb
- 粉丝: 2
- 资源: 33
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- mmqrcode1714153659780.png
- Screenshot_2024-04-27-06-08-58-486_com.baidu.xin.aiqicha.jpg
- 基于Javaweb+Tomcat+MySQL的大学生公寓管理系统+sql文件.zip
- 实训作业基于javaweb的订单管理系统源码+数据库+实训报告.zip
- 多机调度问题贪心算法基于最小堆和贪心算法求解多机调度问题.zip
- 基于同态加密技术的匿名电子投票系统源码.zip
- Pyqt5项目框架-PyQt项目开发实践
- 基于C通过MQTT的智能农业大棚管理系统(本科毕业设计)
- python+CNN的网络入侵检测算法源码.zip
- js 实现记住密码功能 js.cookie.min.js
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0