SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Jqouery Multiple file upload

    Hi every one,
    I am looking for script for mulitple file upload in jquery and php. With ajax fileUpload i can upload one file with ajax but i wanted to upload multiple file. as With server side coding it is taking too much time. Waiting for the feedback.

  2. #2
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    JavaScript can't do file upload unless you use some hidden iframes.
    Logic:- Get Parameters of Form => Post into hidden iframe (same domain) => onload of that iframe call javascript from iframe (i.e. body onload="parent.someMessageTip('Completed')) => Update Message in parent Frame Your file is uploaded.

  3. #3
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks for the reply. But the thing is i have jquery ajaxFileUpload plugin using with which i can upload one file.Which is working properly. In fact i have the jquery code which look
    like

    function fileUpload()
    {
    $.ajaxFileUpload ({
    url: 'doajaxfileupload.php',
    secureuri: false,
    fileElementId: input.id,
    dataType: 'json',
    success: function ( data, status ) {
    try {
    if ( data['error'].length > 0 ) {
    $('a[href^="#multimulti_"]:last').trigger ( 'click' );
    alert ( data['error'] );
    }
    else {
    ... No error. Do stuff ...
    }
    }
    catch ( e ) {
    $('a[href^="#multimulti_"]:last').trigger ( 'click' );
    alert ( 'Error: ' + e.message );
    }
    },
    error: function ( data, status, e ) {
    $('a[href^="#multimulti_"]:last').trigger ( 'click' );
    alert ( 'An error occurred:\n\n' + e + ' (' + status + ')' );
    },
    });

    But its not working...

  4. #4
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That plugin is indirectly doing... whatever written...
    Just open:- ajaxfileupload.js

    See from line 2...

    createUploadIframe: function(id, uri)
    {
    //create frame
    var frameId = 'jUploadFrame' + id;

    if(window.ActiveXObject) {
    var io = document.createElement('<iframe id="' + frameId + '" name="' + frameId + '" />');
    Anyways,look into ajaxfilemanager.js... you may try addMoreFile function... try to play with it..

    All the best.

  5. #5
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ohh!! Thanks for the information. I need to go through ajaxfilemanager.js. I will let you know the success about it.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •