Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

onAllComplete with parameter
  • First of all, great product - thank you!

    However, I have a situation with an upload page that I want to refresh/reload after all files have been completed.

    I got it working great with onAllComplete in my $("#uploadify").uploadify({ settings, but.....

    The page the upload is on, has to receive a URL parameter which is dynamic, and save to a dynamic folder.

    In the following example, the upload folder is changed dynamically and this works great (I've simplified it here with a hardcoded values of 555), the upload works, but the onAllComplete does not fire (again hardcoded for simplicity with value of 123).

    <input type=\"file\" name=\"uploadify\" id=\"uploadify\" />
    <a href=\"javascript:jQuery('#uploadify').uploadifySettings('folder','/path/to/uploads/555'); jQuery('#uploadify').uploadifySettings('onAllComplete','function (event, data) { window.location.href='uploadpage.php?id=123'; }');jQuery('#uploadify').uploadifyUpload();\">Upload</a>


    Same with this example, the alert box does not show:

    <input type=\"file\" name=\"uploadify\" id=\"uploadify\" />
    <a href=\"javascript:jQuery('#uploadify').uploadifySettings('folder','/path/to/uploads/555'); jQuery('#uploadify').uploadifySettings('onAllComplete','function (event, data) { alert(\"hello\"); }'); jQuery('#uploadify').uploadifyUpload();\">Upload</a>


    Any ideas on why the uploadifySettings change to the folder, and the upload works, but the uploadifySettings change to onAllComplete doesn't greatfully received!

    For reference my init script is as follows:

    $(\"#uploadify\").uploadify({
    'uploader' : '/path/to/scripts/uploadify.swf',
    'script' : '/path/to/scripts/uploadify.php',
    'cancelImg' : '/path/to/scripts/cancel.png',
    'folder' : '/path/to/uploads', // <--- this is changed dynamically, see above
    'auto' : false,
    'multi' : true,
    'queueSizeLimit' : 5,
    'fileDesc' : 'file description',
    'fileExt' : '*.doc;*.xls;*.pdf;*.ppt;.*.docx;*.xlsx;*.pptx;*.txt;*.png;*.gif;*.jpg;*.jpeg'
    });


    Just to confirm - the upload all works well, just the onAllComplete either not running/doesn't fire or I've implemented it wrong (more likely)!

    Thank you!