Re: [問題] 關於dreamweaver cs3中的spry使用

看板Ajax作者 (帥啊!老皮)時間16年前 (2007/12/15 16:24), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串2/2 (看更多)
各位版上高手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)

12/15 16:40, , 1F
從response body來看js內容 可能是資料被擷取錯誤..
12/15 16:40, 1F
文章代碼(AID): #17OuyaLc (Ajax)
文章代碼(AID): #17OuyaLc (Ajax)