English 中文(简体)
使用 prettyPhoto 上传: 未执行的例外 : 调用启动装入失败
原标题:uploadify with prettyPhoto : uncaught exception: Call to StartUpload failed

我们一直在使用 < a href=> http://www.uploadify.com/"" rel="nofollow" > 上传图像和 < a href=> http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/" rel="nofollow" > >prettyPhoto 在我们的铁路应用程序中的灯盒上显示图像。 如果单独使用, 两者都效果良好。 现在我们想要在灯盒上显示上传的控制, 就像 < a href=> https://www.dropbox.com/" rel=" nofolpoltbox 使用, 但是如果使用漂亮的Photo, 它会开始尖叫。

这是使用漂亮的 Photo 上传的样本 html 。

<!DOCTYPE html>
<html>
<head>
    <title>My Uploadify Implementation</title>
    <link rel="stylesheet" type="text/css" href="uploadify.css">
    <link rel="stylesheet" type="text/css" href="prettyPhoto.css" />
    <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="jquery.uploadify-3.1.min.js"></script>
    <script src="jquery.prettyPhoto.js" type="text/javascript"></script>

    <script type="text/javascript">
    $(function() {
        $( #file_upload ).uploadify({
             swf       :  uploadify.swf ,
             uploader  :  uploadify.php 
            // Your options here
        });

        $( #closeme ).live( click , function() {
            $.prettyPhoto.close();
            return false;
        });

        $("a[rel^= prettyPhoto ]").prettyPhoto();

    });
    </script>
</head>
<body>
<a href="#inline-1" rel="prettyPhoto" >popop</a>
    <div id="inline-1" style="display:none;">
        <p>This is inline content opened in prettyPhoto.</p>
        <input type="file" name="file_upload" id="file_upload" />
    </div>
</body>
</html>

您可以在这里看到弹出链接, 并点击它显示的光框上上传控件的链接。 然后您从磁盘中选择图像上传到服务器。 在选择图像后, 我面对两个问题 :

(1) 正在获取 Error: 未捕捉的例外 : 在 FF 和 Crome 上调调用启动装入失败 javascript 错误

2) 选中的图像没有在光箱上上上传控制列表。 如果您关闭小狗, 并再次点击弹出链接, 它会显示文件列表 。

如果我删除 $ ("a[rel prettyPhoto]") ) 。 pettyPhoto (; line, 则将工作上传为罚款 。

你知道怎么修吗?

如果有人建议其他插件 来达到这种投放箱风格的上传器,我也会很感激的。

谢谢,阿密派特

问题回答

您会想要在打开光箱后初始化上传功能, 而不是在页面上加载。 原因是如果元素被隐藏, Flash 将不装入 。

我看着美丽的Photo api, 找不到任何事件 被称作 在灯盒打开后, 但这是你需要做的。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签