This forum is a community forum meant for users of the plugin to collaborate and help solve issues with implementation, etc. Unfortunately, as the creator of the plugin, I do not have much time to attend to every request here as this is only a side project and I must work a full-time job to provide for my family. This is how I keep the Flash version free and the HTML5 version low cost.
UploadiFive 1.1.1 has been released which includes a small fix for added support on touch devices including iOS 6 devices.
updating values through fileUploadSettings - help needed
  • Hi Guys,

    Almost got this all working now, but it does not seem to update the url and comment value through the bind function i created, am i missing something?

    Thanks,
    James

    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\">
    <head>
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
    <title>Submit a URL to xxx Links</title>
    <link href=\"/skins/basic/customer/styles.css\" rel=\"stylesheet\" type=\"text/css\" />
    <link href=\"uploadify.css\" rel=\"stylesheet\" type=\"text/css\" />
    <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></script>
    <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js\"></script>
    <script type=\"text/javascript\" src=\"http://www.xxx.co.uk/jquery.uploadify.js\"></script>
    <script type=\"text/javascript\" src=\"http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js\"></script>

    <script type=\"text/javascript\">

    $(document).ready(function() {
    $('#fileToUpload').fileUpload ({
    'uploader' : 'uploader.swf',
    'script' : 'upload-ORW.php',
    'cancelImg' : 'cancel.png',
    'auto' : true,
    'folder' : '/upload/ORW',
    'buttonImg' : '/images/browseButton.jpg',
    'fileExt' : '*.jpg;*.gif;*.png;*.swf',
    'wmode' : 'transparent',
    'width' : '65',
    'height' : '28',
    'scriptData': {'name':'name', 'url':'url', 'comment':'comment'}
    });

    $('#name').bind('change', function(){
    $('fileToUpload').fileUploadSettings('scriptData','&amp;name='+$(this).val()+'&amp;url='+$('#url').val()+'&amp;comment='+$('#comment').val());
    });

    $(\"#Form1\").validate({
    rules: {
    url: \"required\",
    comment: \"required\"
    },
    messages: {
    url: \"< Please enter a URL for this link\",
    comment: \" < Please enter details for this link\"
    }
    });

    });

    </script>
    </head>

    <body>
    <div id=\"popup\">

    <h1>Request to add a link</h1>

    <div id=\"requestlinkbox\">
    <form id=\"Form1\" name=\"Form1\" method=\"post\" action=\"upload-ORW.php\" class=\"requestbox\" enctype=\"multipart/form-data\">

    <table width=\"100%\" border=\"0\" cellspacing=\"4\" cellpadding=\"0\">
    <tr>
    <td width=\"135\" style=\"vertical-align: top; padding: 6px 0 0 0;\"><label style=\"padding-left: 10px;\" for=\"fileToUpload\">Select an image:</label></td>
    <td><input type=\"file\" name=\"fileToUpload\" id=\"fileToUpload\" size=\"25\" /></td>
    </tr>
    <tr>
    <td style=\"vertical-align: top;\"><label style=\"padding-left: 10px;\" for=\"url\">Website URL:</label></td>
    <td> <input type=\"text\" name=\"url\" id=\"url\" size=\"46\" style=\"border: 0;\" /></td>
    </tr>
    <tr>
    <td style=\"vertical-align: top; padding: 8px 0 0 0;\"><label style=\"padding-left: 10px;\" for=\"comment\">Details:</label></td>
    <td><textarea cols=\"35\" rows=\"4\" name=\"comment\" id=\"comment\" style=\"border: 0;\"></textarea></td>
    </tr>
    <tr>
    <td><input type=\"submit\" value=\"Submit\" id=\"buttonForm\" class=\"flexibutton\" /></td>
    <td style=\"text-align: right;\"><a class=\"flexibutton\" href=\"#\" onclick=\"javascript:window.close();\" title=\"close window\">close</a></td>
    </tr>
    </table>

    </form>

    </div>

    </div>
    </body>
    </html>
  • The code above does not show any input elements that are linked to id="name"
  • sorry

    $('#fileToUpload').bind('change', function(){
    $('fileToUpload').fileUploadSettings('scriptData','&name='+$(this).val()+'&url='+$('#url').val()+'&comment='+$('#comment').val());
    });

    it is now, it passes the file name to upload.php fine, but the url and comment dont get update and uses the default set when i $_GET[''] them.

    Thoughts?

    Thanks again
  • fileToUpload is never changed. Uploadify hides your div and replaces it with it's own.

    You'll need to find another way to update the scriptData.

    One method is to switch of auto and bind the submit button to a js function that updates your scriptData, then starts the upload and then submit the form.
  • think i have just been on this to long - not sure why this is not working now - but loads normal image input and not flash uploader, does not upload image, or update the values now lol

    can you see what ive got wrong here?

    $(\"#Form1\").bind(\"submit\", function() { 
    $('#fileToUpload').fileUpload ({
    'uploader' : 'uploader.swf',
    'script' : 'upload-ORW.php',
    'cancelImg' : 'cancel.png',
    'folder' : '/upload/ORW',
    'buttonImg' : '/images/browseButton.jpg',
    'fileDesc' : '.jpg, .gif, .png, .swf',
    'fileExt' : '*.jpg;*.gif;*.png;*.swf',
    'wmode' : 'transparent',
    'width' : '65',
    'height' : '28',
    'scriptData': {'name':'name', 'url':'url', 'comment':'comment'},
    'onAllComplete': function() {
    $('#buttonForm').fileUploadSettings('scriptData','&amp;name='+$(this).val()+'&amp;url='+$('#url').val()+'&amp;comment='+$('#comment').val());
    }
    });
    });
  • yeah, you've missed what I was saying. This is brief so you'll need to fill in the code blanks, but should set you on the right path

    js
    $(document).ready(function() {
    $('#fileToUpload').fileUpload ({
    .....
    onAllComplete: function () {
    ('#Form1').get(0).submit();
    }
    });

    then inside another set of script tags. Make sure you correct the this reference

    function startUpload () {
    $('#buttonForm').fileUploadSettings('scriptData','&amp;name='+$(this).val()+'&amp;url='+$('#url').val()+'&amp;comment='+$('#comment').val());
    $('#fileToUpload').fileUploadStart();
    }

    lastly change your submit button line in your html to

    <td><input type=\"button\" value=\"Submit\" id=\"buttonForm\" class=\"flexibutton\" onclick=\"javascript:startUpload();\"/></td>
  • Hi Travis,

    Thanks for getting back to me on this, been a great help! I hope i managed ot get his right, but when i hit submit it does not start the upload of the image. code is as follows:

    really appriciate your help on this

    <!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">
    <html xmlns=\"http://www.w3.org/1999/xhtml\">
    <head>
    <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
    <title>Submit a URL to xxx Links</title>
    <link href=\"/skins/basic/customer/styles.css\" rel=\"stylesheet\" type=\"text/css\" />
    <link href=\"uploadify.css\" rel=\"stylesheet\" type=\"text/css\" />
    <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></script>
    <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js\"></script>
    <script type=\"text/javascript\" src=\"http://www.xxx.co.uk/jquery.uploadify.js\"></script>
    <script type=\"text/javascript\" src=\"http://dev.jquery.com/view/trunk/plugins/validate/jquery.validate.js\"></script>
    <script type=\"text/javascript\">
    function startUpload() {
    $('#buttonForm').fileUploadSettings('scriptData','&amp;url='+$('#url').val()+'&amp;comment='+$('#comment').val());
    $('#fileToUpload').fileUploadStart();
    }
    </script>
    <script type=\"text/javascript\">

    $(document).ready(function() {

    $('#fileToUpload').fileUpload ({
    'uploader' : 'uploader.swf',
    'script' : 'upload-ORW.php',
    'cancelImg' : 'cancel.png',
    'folder' : '/upload/ORW',
    'buttonImg' : '/images/browseButton.jpg',
    'fileDesc' : '.jpg, .gif, .png, .swf',
    'fileExt' : '*.jpg;*.gif;*.png;*.swf',
    'wmode' : 'transparent',
    'width' : '65',
    'height' : '28',
    'scriptData': {'url':'url', 'comment':'comment'},
    onAllComplete: function() {
    ('#Form1').get(0).submit();
    }
    });

    $(\"#Form1\").validate({
    rules: {
    url: \"required\",
    comment: \"required\"
    },
    messages: {
    url: \"< Please enter a URL for this link\",
    comment: \" < Please enter details for this link\"
    }
    });

    });

    </script>
    </head>

    <body>
    <div id=\"popup\">

    <h1>Request to add a link</h1>

    <div id=\"requestlinkbox\">
    <form id=\"Form1\" name=\"Form1\" method=\"post\" action=\"upload-ORW.php\" class=\"requestbox\" enctype=\"multipart/form-data\">

    <table width=\"100%\" border=\"0\" cellspacing=\"4\" cellpadding=\"0\">
    <tr>
    <td width=\"135\" style=\"vertical-align: top; padding: 6px 0 0 0;\"><label style=\"padding-left: 10px;\" for=\"fileToUpload\">Select an image:</label></td>
    <td><input type=\"file\" name=\"fileToUpload\" id=\"fileToUpload\" size=\"25\" /></td>
    </tr>
    <tr>
    <td style=\"vertical-align: top;\"><label style=\"padding-left: 10px;\" for=\"url\">Website URL:</label></td>
    <td> <input type=\"text\" name=\"url\" id=\"url\" size=\"46\" style=\"border: 0;\" /></td>
    </tr>
    <tr>
    <td style=\"vertical-align: top; padding: 8px 0 0 0;\"><label style=\"padding-left: 10px;\" for=\"comment\">Details:</label></td>
    <td><textarea cols=\"35\" rows=\"4\" name=\"comment\" id=\"comment\" style=\"border: 0;\"></textarea></td>
    </tr>
    <tr>
    <td><input type=\"submit\" value=\"Submit\" id=\"buttonForm\" class=\"flexibutton\" onclick=\"javascript:startUpload();\" /></td>
    <td style=\"text-align: right;\"><a class=\"flexibutton\" href=\"#\" onclick=\"javascript:window.close();\" title=\"close window\">close</a></td>
    </tr>
    </table>

    </form>

    </div>

    </div>
    </body>
    </html>
  • this line
        <td><input type=\"submit\" value=\"Submit\" id=\"buttonForm\" class=\"flexibutton\" onclick=\"javascript:startUpload();\" /></td>


    input type needs to be "button" not "submit"
  • opps sorry, did not notice that part. I have made that change but recieve this error:

    document.getElementById(a(this).attr("id") + "Uploader") is null
    [Break on this error] var flashVer=-1;if(navigator.plugins!=nu....clearFileUploadQueue()})}})})(jQuery)};
  • Hi again, i need to get this project cleared out tonight and would really like to use your uploadify script but if i cannot get this done i will have to code up a normal PHP one.

    If someone could give me a clue to why i get this error would be great!
  • dont worry have resolved it now.

    it was down to the ID it was calling

    function startUpload() {
    $('#fileToUpload').fileUploadSettings('scriptData','&url='+$('#url').val()+'&comment='+$('#comment').val());
    $('#fileToUpload').fileUploadStart();
    }

    Now it emails me all details, uploads the file just need to get it sorted to it says its complete :)

    Thanks for your help
  • leather female bag itself the natural oils with time cheap handbags online sale or number of USES too much and reduced gradually, so even if is a very high level of leather also need regular maintenance. cheap&good quality handbags Suggest you in every store before leather products, should it do to dust cleaning. The general cortical products better use the leather maintain oil for maintenance, it is the oil on in clean cotton cloth, and then again even ground is wipe the surface, avoid wholesale and retail fashion handbags to apply directly to the oil in leather goods, in order to avoid damage the leather.