views:

60

answers:

1

Hi All

am using jquery uploadify for uploading file

How we get that user has selected a file or not. I tried to using the folder object value of uploadify object but its not working for me.. It always same.. I assume that it was null before it.

Is any way for it

Thanks Amit Battan

A: 

You could try something like this:

<script type="text/javascript">  
var selected = false;
$(document).ready(function() {
    $('#fileInput').uploadify({
        'uploader'  : 'uploadify.swf',
        'script'    : 'uploadify.php',
        'cancelImg' : 'cancel.png',  
        'auto'      : true,  
        'folder'    : '/uploads',
        'onSelect'  : function() { selected = true; },
        'onCancel'  : function() { selected = false; }
    });
});
</script>

Then you can test if 'selected' is true/false.

Guilherme Oenning
Hi... Thanks a lot...I have one more problem regarding this.http://stackoverflow.com/questions/3298676/uploadify-uploadifysettings-error-in-ie
Amit