易截截图软件、单文件、免安装、纯绿色、仅160KB

AJAX Cross Domain Same Origin Policy limitation

摘自:http://www.ibm.com/developerworks/library/wa-aj-jsonp1/
AJAX Same-Origin Policy(SOP) limitation:
 AJAX prevents cross-domail invokation, there are several ways to by pass this limitation.
1. write a proxy on the server side. The SOP limitation only exists only on the javascript side.  While on the side, we can still invoke the other domail url such as via HttpClient
2. iFrame ( not sure )
3. JSONP(JSON with Padding)
the same-origin policy doesn't prevent the insertion of dynamic script elements into the document. That is, you could dynamically insert JavaScript from different domains, carrying JSON data in them.
<mce:script type="text/javascript"><!--
// This is our function to be called with JSON data
function showPrice(data) {
alert("Symbol: " + data.symbol + ", Price: " + data.price);
}
var url = “ticker.js”; // URL of the external script
// this shows dynamic script insertion
var script = document.createElement('script');
script.setAttribute('src', url);
// load the script
document.getElementsByTagName('head')[0].appendChild(script);
// --></mce:script>
Note that, in order to do this, you must have a callback function already defined in the Web page at the time of insertion.
Beginning with version 1.2, jQuery has had native support for JSONP calls. You can load JSON data located on another domain if you specify a JSONP callback, which can be done using the following syntax: url?callback=?.
AJAX invoke:
jQuery.getJSON("http://www.yourdomain.com/jsonp/ticker?symbol=IBM&callback=?",
function(data) {
alert("Symbol: " + data.symbol + ", Price: " + data.price);
});

Another domain generates json data and returned to client side with callback function.
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
String jsonData = getDataAsJson(req.getParameter("symbol"));
String output = req.getParameter("


相关文档:

Ajax实现的明细去除重复 datatable去除重复

ajax  Detail.aspx页面
 protected void Page_Load(object sender, EventArgs e)
    {
        Thread.Sleep(500);
        string Keyid = Request.QueryString["Id"].ToString();
      ......

Ajax 和 XML: 五种常见 Ajax 模式

好久不碰WEB的东东了,最近学习SAP的BSP技术,又用到这些,顺便转篇文章,备查.
原文地址: http://www.ibm.com/developerworks/cn/xml/x-ajaxxml2/
Ajax 和 XML:

种常见 Ajax 模式
可立即使用这些非常有用的 Ajax 设计模式
文档选项
<tr valign="top"><td width="8">< ......

泛型通用动态查询(LinQ+Ajax)

我的春秋痴梦第二步:
写一个 通用的 对象 列表 ,还 包含 搜索和 属性过滤。
具体的效果是:
当新 业务 添加一个 表的时候,只需要在 对象模型里的 添加一个 model
后台几乎不需写代码。
(我是后台:激动人心!)
调用的对象,第几页,属性的 过滤 和搜索全是 前台的Ajax参数控制
(我是前台:#$!@#$%$^#$% ......

DWZ框架Ajax开发视频教材

视频下载地址
: http://dwz.duqn.com/doc/dwz-ajax-develop.swf

ajax 表单提交、分页组件


大家在使用DWZ框架过程中遇到问题最多的也是ajax表单提交处理流程、分页组件问题。本教材主要是讲解DWZ框架表单提交、分页等ajax交互原理和规范。DWZ其它组件这里不再讲解了,大家去看DWZ用户手册,特别是第一次使用一 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号