开发者

SWFUpload gives the error "Invalid function name: ReturnUploadStart" in Firefox only

开发者 https://www.devze.com 2023-04-04 06:59 出处:网络
I\'m using SWFUpload to upload files on my website. It works fine in all 开发者_如何转开发browsers except Firefox, where it always gives the javascript error Invalid function name: ReturnUploadStart a

I'm using SWFUpload to upload files on my website. It works fine in all 开发者_如何转开发browsers except Firefox, where it always gives the javascript error Invalid function name: ReturnUploadStart as soon as the upload starts.

I'm using SWFUpload 2.2.0 Beta 2 with jquery-asyncUpload-0.1.js. I'm using Firefox 6.0.2

What gives?


This error occurs in Firefox if there is no css to style the progress bar. Other browsers seem to work just fine, showing the text "Uploading..." instead, but for some reason Firefox breaks.

Try using this css to get you started:

DIV.ProgressBar { width: 100px; padding: 0; border: 1px solid black; margin-right: 1em; height:.75em; margin-left:1em; display:-moz-inline-stack; display:inline-block; zoom:1; *display:inline; }
DIV.ProgressBar DIV { background-color: Green; font-size: 1pt; height:100%; float:left; }
SPAN.asyncUploader OBJECT { position: relative; top: 5px; left: 10px; }


This worked for me:

  • included the CSS as in teedyay's answer
  • upgrade swfupload to latest stable (2.2.0 at time of writing)
  • only manipulated the flash video (upload button) in the upload completed event (using a jquery hide())
0

精彩评论

暂无评论...
验证码 换一张
取 消