Not able to use jQuery Form Plugin file upload

Not able to use jQuery Form Plugin file upload

I'm trying to get jQuery Form Plugin to work. So first things first.
Is there something wrong with this script?

The function starts with a semicolon
  1. ;(function($) {

I'm trying to upload a file using IFrame to avoid reloading the page.

This is my HTML code:

  1. <form id="uploadForm" enctype="multipart/form-data" action="" method="POST" target="upload_target">
    <input type="hidden" name="MAX_FILE_SIZE" value="1000000" />
    <?php _e('Choose a file to upload') ?>:
    <input name="file" type="file" />
    <input type="submit" class="button uploadImage" value="<?php _e('Upload File') ?>" />
    </form>

    <iframe id="upload_target" name="upload_target" src="#" style="width:500px;height:100ox;border:1px solid #fff;"></iframe>

    <div id="uploadOutput"></div>










And this is my test jQuery so far:

  1. //File upload
    jQuery('#uploadForm').bind('submit', function() {
    alert('test');
    jQuery(this).ajaxSubmit({
    target: '#uploadOutput',
    success: function(data) {
    alert('terst');
    }
    });
    return false; // <-- important!
    });












I also tried jQuery('#uploadForm').ajaxForm(), but that didn't get me any respons either.

I know I have to add the following options:
iframe: true
url: url: "../wp-content/plugins/wp-filebrowser/uploader.php"


Does anyone have a working example of uploading a file using jQuery Form Plugin with IFrame?