views:

53

answers:

2

I am using jQuery Uploadify and it doesn't re render the FileUpload control after UpdatePanel's updated.

here's the js code:


    $(document).ready(
        function () {
            $("#").uploadify({
                'uploader': 'scripts/uploader.swf',
                'cancelImg': 'images/cancel.png',
                'buttonText': 'Browse Files',
                'script': 'Uploader.ashx',
                'folder': '',
                'fileDesc': 'Image Files',
                'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
                'multi': true,
                'auto': true,
                'queueSizeLimit': 5,
                'onComplete': function (event, queueID, fileObj, response, data) {
                    $('#imgs').append('');
                }
            });
        }
    );

I even put that code inside the UpdatePanel ContentTemplate and still doesn't work.

What should I do? Thanks!

A: 

ok I got it

I made a JS function called "ReloadUploader" and call it using RegisterClientScriptBlock

Nullstr1ng
A: 

try this one

    function pageLoad(){
        $("#").uploadify({
            'uploader': 'scripts/uploader.swf',
            'cancelImg': 'images/cancel.png',
            'buttonText': 'Browse Files',
            'script': 'Uploader.ashx',
            'folder': '',
            'fileDesc': 'Image Files',
            'fileExt': '*.jpg;*.jpeg;*.gif;*.png',
            'multi': true,
            'auto': true,
            'queueSizeLimit': 5,
            'onComplete': function (event, queueID, fileObj, response, data) {
                $('#imgs').append('');
            }
        });
    }

This will be called every UpdatePanel postback request.

hallie