Im having trouble getting SWFUplader to play ball in my codeigniter application

Posted by Purplefish32 on Stack Overflow See other posts from Stack Overflow or by Purplefish32
Published on 2010-04-13T12:08:01Z Indexed on 2010/04/13 12:13 UTC
Read the original article Hit count: 215

Filed under:
|
|

I have this peice of code in my handler.js, I'm getting the correct serverData value throught ajax, ( Well it's echoed correctly un the alert box) but no matter what, i just cant seem to enter either of the 'if' blocks. I have double checked the type and it is a string. Something is definetly funky.

function uploadSuccess(file, serverData) {
 try {                
                var progress = new FileProgress(file, this.customSettings.progressTarget);

                alert(serverData);

                if(serverData == "uploadSuccess") {
                    progress.setComplete();
                    progress.setStatus("Completed");
                    progress.toggleCancel(false);
                }
                if(serverData == "uploadError") {
                    progress.setError();
                    progress.toggleCancel(false);
                    progress.setStatus("Error: X");
                    progress.toggleCancel(false);
                }
 }

        catch (ex) {
  this.debug(ex);
 }
}

© Stack Overflow or respective owner

Related posts about codeigniter

Related posts about swfupload