开发者

swfupload - multiple instances and setting dynamic data with setPostParam

开发者 https://www.devze.com 2023-01-09 08:19 出处:网络
I am using swfupload, and have a bunch of \'Attach File\' links and each one of them opens up the same Jquery Dialog which is associated with 1 swfupload inst开发者_运维知识库ance. I tried to set cust

I am using swfupload, and have a bunch of 'Attach File' links and each one of them opens up the same Jquery Dialog which is associated with 1 swfupload inst开发者_运维知识库ance. I tried to set custom post params but it fails: www.arianhojat.com/temp/code/swfupload/index.html

if you remove the 'setPostParam' line its fine but id like to set params... It gives an error in firebug: "uncaught exception: Call to SetPostParams failed"...

So instead i tried an alternate solution... I came up with recreating the swfupload object each time the Dialog opens up... and destroy it after it closes... but i get a "uncaught exception: Could not find Flash element" at the end. not sure if that is a critical error as the popup still shows up if you reclick links. I think this may be possiblly the way to go but not sure about that error

Here is my online example of that code in action: http://www.arianhojat.com/temp/code/swfupload/index_destroy.html

(PS the file upload should close the dialog and alert an error, as I dont have that host setup right now to correspond to the java servlet backend i have to handle it... just wanted to get the frontend working first and get rid of that error so errors are first handled gracefully without firebug user like myself noticing a js error occured.)


You have to use css positioning to hide (and not display:block/none;) and show your dialog as the Flash reloads when you hide/unhide it and goofs.

0

精彩评论

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