Howdy, Stranger!

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

start onload
  • Hi,

    Sorry for my language but i don't speak well english.

    I would like to know if there's a way to open the selection window immediately after loading the script (without clicking the button) ?

    thanks
  • That sounds like it might be a confusing interface.

    This is not tested, but it might be possible on the onInit handler.

    Since Uploadify is a jQuery plugin, you would basically using jQuery to simulate a click on the button.

    [code=php]
    /**
     * Anonymous function. Used as onInit handler for Uploadify
     **/
    var uploadifyOnInit = function() {
      $('#file_upload').click(); // where ("#file_upload') is the element you've used for Uploadify
    }
     [/code]

    [code=php]
    /**
     * Set up Uploadify
     **/
    $("#file_upload").uploadify(
        'uploader':'scripts/uploadify.swf',
        'script':'uploadify.php',
        ...,
        'onInit': uploadifyOnInit
        
    ...
    );
     [/code]
  • Hello bdp,

    Thanks for reply.

    I tried like this (and by simulate a click directly on the flash class -fileUploaderBtn-) but it appear that it's not possible to simulate a click on a flash element... :?
    I tried to add a new param into the flash (autoplay on true) but nothing append too.

    I don't know how to do that without modify the fla (my version of flash is too old).
  • You can't do it. Flash security requires the browse dialog to be activated via a flash event