0
這是令我感到困擾的代碼。我需要找到的代碼,用的fancybox代碼替換,但它拋出一個錯誤:win
未定義在ColdFusion中查找並替換
更換mywin值
<cfsavecontent variable="x">
mywin = window.open (url,"win",'toolbar=yes,location=yes,resizable=yes,copyhistory=yes,scrollbars=yes,width=878,height=810');
</cfsavecontent>
這樣:
mywin = $.fancybox('href' :url,'width': '500');
我想像這樣
<cfset a = Replace(x,"mywin = window.open (url,"win",'toolbar=yes,location=yes,resizable=yes,copyhistory=yes,scrollbars=yes,width=878,height=810');","$.fancybox()","one")>
更新代碼:
<cfsavecontent variable="foo">
function setmycode() {
url = "http://myurl.com?thestep=9&sortBy=1&sortOrder=1";
mywin = window.open (url,"win",'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,resizable=yes,copyhistory=yes,scrollbars=yes,width=878,height=810');
mywin.focus();
return false;
}
</cfsavecontent>
<cfset a = Replace(foo,"mywin = window.open (url,""win"",'toolbar=yes,location=yes,resizable=yes,copyhistory=yes,scrollbars=yes,width=878,height=810');","$.fancybox()","one")>
<cfdump var="#a#">
在CFML一個被他們加倍,例如這是否以及如何添加額外的雙引號贏取,這是從cfhttp內容的代碼,我不能做到staright的方式,需要做與coldfusion – jojo
我試過你的代碼它沒有工作檢查編輯的問題請 – jojo
什麼你的意思是「這是來自cfhttp內容的代碼」嗎?你的問題中的代碼示例是否是你正在詢問的*實際代碼?沒有什麼關於''的。請修改您的問題*準確*描述您正在解決的情況,並用*實際代碼*來說明問題。不要依靠我們猜測或承擔事情。閱讀:http://blog.adamcameron.me/2013/09/short-self-contained-correct-compilable.html,以及我鏈接到的文檔。這就是你需要如何解決你的問題,以便他們負責任。 –