0
我被困在我的網站上的一個點上:http://clients.arkamatics.com/signature/我在其他插件上使用colorbox,比如uploadify和colorpicker,當我在本地xampp服務器上檢查它時,代碼正常工作,但一旦我上傳在網上的顏色框沒有加載iframe和內容,按照您可以執行以下步驟:jquery colorbox not loading iframe content
- 打開網站:http://clients.arkamatics.com/signature/
- 在左下角有一個上傳按鈕,點擊該並上傳一個文件,
- 上傳完成的過程,一個提醒(這是我們的一部分調試)將顯示您傳遞給colorbox以在iframe中打開的url。
的顏色框打開,但只能顯示加載圖標,不加載在iframe中的URL內容,下面是一組代碼,我使用做同樣的:
$("#fileUpload").fileUpload({ 'uploader': 'uploadify/uploader.swf', 'cancelImg': 'uploadify/cancel.png', 'script': 'uploadify/upload.php', 'folder': '/images', 'multi': false, 'displayData': 'speed', 'auto' : true, 'buttonImg' : 'uploadify/btnupload.png', 'wmode' : 'transparent', 'onComplete' : function(event, ID, fileObj, response, data) { //alert('There are ' + fileObj.name + ' files remaining in the queue.'+fileObj.type); //$(".img_tpl").load('uploadedimage.php?filename='+fileObj.name); var filename = fileObj.name.replace(/ /g,"_"); var colboxurl = 'upload1/uploadedimage.php?filename='+filename; alert(colboxurl); $.fn.colorbox({iframe: true, href:colboxurl, width:"90%", height:"90%",onClosed:function(){ $(".img_tpl").load('upload1/showfinalimage.php?filename='+filename,function(){ $(".file_name").val($(".img_tpl img").attr('src')); $(".remove_img").show(); adjustheights(); }) }}); } });
任何幫助將不勝感激。