作者JeffMcBride (帅啊!老皮)
看板Ajax
标题Re: [问题] 关於dreamweaver cs3中的spry使用
时间Sat Dec 15 16:24:03 2007
各位版上高手SOS...
关於这个问题 仍无法解决..
希望这些找到的线索可以帮忙.. m(_ _)m 刚温!
从firebug看到的错误有一行是来自SpryData.js的内容
missing ; before statement
r, valArr[1]);\n
从程式码来看
2666Spry.Utils.updateContent = function (ele, url, finishFunc, opts)
2667{
2668 var method = (opts && opts.method) ? opts.method : "GET";
2669 Spry.Utils.loadURL(method, url, false, function(req)
2670 {
2671 Spry.Utils.setInnerHTML(ele, req.xhRequest.responseText);
2672 if (finishFunc)
2673 r, valArr[1]); <--此段落开始无故被接上
2674 }
2675
2676 // Tag the node with an attribute that will allow us to fetch the row
2677 // number used when it is written out during the re-generation process.
2678
2679 node.setAttribute(rowNumAttrName, "{" + (dsName ? (dsName + "::") : "") + "ds_RowNumber}");
2680};
也就是说 本来是不连续的function 但是被浏览器认为是在同个区块内
不知道是我的误解还是怎样..
如果是浏览器问题..用ie应该也行才对
结果还是不行...
以下附上原本这两段的原始码
行2666-2671的原始function
Spry.Utils.updateContent = function (ele, url, finishFunc, opts)
{
var method = (opts && opts.method) ? opts.method : "GET";
Spry.Utils.loadURL(method, url, false, function(req)
{
Spry.Utils.setInnerHTML(ele, req.xhRequest.responseText);
if (finishFunc)
finishFunc(ele, url);
}, opts);
};
行2673-2680的原始function
Spry.Data.Region.setUpRowNumberForEvenOddAttr = function(node, attr, value, rowNumAttrName)
{
if (!value)
{
Spry.Debug.showError("The " + attr + " attribute requires a CSS class name as its value!");
node.attributes.removeNamedItem(attr);
return;
}
var dsName = "";
var valArr = value.split(/\s/);
if (valArr.length > 1)
{
dsName = valArr[0];
node.setAttribute(attr, valArr[1]);
}
// Tag the node with an attribute that will allow us to fetch the row
// number used when it is written out during the re-generation process.
node.setAttribute(rowNumAttrName, "{" + (dsName ? (dsName + "::") : "") + "ds_RowNumber}");
};
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.114.24.33
※ 编辑: JeffMcBride 来自: 140.114.24.33 (12/15 16:26)
1F:→ JeffMcBride:从response body来看js内容 可能是资料被撷取错误.. 12/15 16:40