【发布时间】:2011-11-04 07:17:29
【问题描述】:
我被困在我的网站上的某个地方:http://clients.arkamatics.com/signature/ 我正在使用 colorbox 和其他一些插件,比如 uploadify 和 colorpicker,当我在本地 xampp 服务器上检查代码时,代码对我来说很好,但是一旦我上传到网上,colorbox没有加载iframe和内容,接下来你可以执行以下步骤:
- 打开网站: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(); }) }}); } });
任何帮助将不胜感激。
【问题讨论】: