Howdy, Stranger!

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

file input element must remain in dom, visible?
  • if the file input element is hidden/moved/removed from dom, the uploader ceases to work. no further events are fired.

    just thought i'd share. i have an application which demands the form disappear when 'submit' is clicked.

    i'm not sure i can use uploadify. one of my uploader criteria was ability to toggle single/multi file upload. uploadify advertises this feature, but does not actually have it. also the documentation does not seem to mention that the file field must stay put on the page.

    nice-looking project, just not mature/robust/flexible enough for all needs.
  • I have a similar problem. It seems if the input tag is in a div that is hidden the scripData stops returning any data to the script url.

    Does anyone know a way around this?

    Thanks
  • this is apparently a consequence of using flash 10. i have discovered that it is possible to place the flash piece inside an absolutely positioned div. by controlling the parent element's height/width one can effectively hide/show the flash piece without disrupting its behaviour.
  • doctor_claw said:
    this is apparently a consequence of using flash 10. i have discovered that it is possible to place the flash piece inside an absolutely positioned div. by controlling the parent element's height/width one can effectively hide/show the flash piece without disrupting its behaviour.


    I bet this is a security feature. So that no one can bury a flash item and mess with the user or the page.
  • Ran into the same issue today while trying to use this pluggin for a small development.

    Scenario:
    We have a form with a few tabs and the file Uploadifyed input is on the 3rd tab, where users can upload their pictures.

    After some consideration we agreed to use the plugin even if this issue makes things complicated, and included a check in our tab switching script to ask users if they really want to switch to another tab because this will mean they will reset any unsaved files selection :)


    // Check if the uploader element is present to avoid errors
    var fileUploadElement = $('#optionsUploader').size();

    // Check if there are any visible items or in other words, files to be uploaded ;)
    var fileUploadItems = $('.fileUploadQueueItem:visible').size();

    ...

    if( fileUploadElement>0 && fileUploadItems>0 ){
    // Using Try just in case something goes wrong to avoid errors
    try {
    if( confirm(\"---question---\") ){
    $('#optionsUploader').fileUploadClearQueue();
    } else {
    return false;
    }
    } catch(err) {
    plugin_exists = false;
    }
    }

    ...


    This at least will keep the plugin alive. And belive me, i know this is a nasty solution to this problem but it worked for us for now, until a better fix is realeased.
    Hope someone can find this helpfull. :mrgreen: