在 fancybox 内上传 - 不工作
有人在 fancybox 中成功使用 uploadify 吗?如果我在普通页面上创建表单设置,则 uploadify 可以正常工作,但如果我采用完全相同的代码并将其放入 fancybox 中,则效果不佳。 uploadfield更改为uploadify,但是当在我的按钮上调用uploadifyUpload时,uploadify的js给出错误。有这方面的经验或想法吗?
Has anyone succesfully used uploadify inside fancybox? If I create a form setup on a normal page uploadify works perfectly, but if I take the exact same code and puts inside a fancybox it does not. The uploadfield is changed to uploadify, but when calling uploadifyUpload on my button the js of uploadify gives an error. Any experience or ideas on this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这确实很旧,但是在我进行搜索后似乎没有一个好的答案,所以我想在这里添加一个:
解决方案是每次打开 fancybox 窗口时初始化 uploadify,方法是在onStart() 处理程序。
如果 uploadify 已经初始化(例如,之前已经打开 fancybox),则必须添加代码来重置 uploadify。您可以通过在 onStart() 处理程序中并在初始化 uploadify 之前添加代码来完成此操作,类似于:
I know this is really old, but there doesn't seem to be a good answer anywhere after I did a search, so I wanted to add one here:
The solution is initialize uploadify each time the fancybox window is opened, by doing it in the onStart() handler.
You'll have to add code to reset uploadify if it had already been initialized (e.g. fancybox has already been opened before). You can do this by adding code within the onStart() handler and before initializing uploadify, similar to this:
抱歉我回复晚了,没有收到您的评论通知 - 代码现在已更改为使用另一个 jQuery 上传脚本,来自 lagoscript.org,我还对其进行了一些修改以更好地满足我的需求。这样我还可以避免使用 Flash,这可能会成为我正在从事的项目中的一个问题。
Sorry for my late response, wasnt notifed about your comment - the code is now changed to use another jQuery upload script, one from lagoscript.org, which I also modified a bit to better fit my needs. This way I also avoid the use of Flash which could become an issue in the project I am working on.