Results 1 to 3 of 3

Thread: Preview Images before upload and upload all images at once

  1. #1
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Preview Images before upload and upload all images at once

    Hi All,

    I dont have much idea about javascript and thats why again I am here...

    I am trying to do a picture gallery like this.

    I have 1 <input type=file name=file> inside a form tag.

    I have 8 <td>s below where 8 images can be shown up with a delete button for 8 images.That means the user can upload upto 8 imgs one by one via that single input file.Now lets say I have selected 1 image and that image will be displayed on 1st box.....next select 2nd image and that image will also be shown up in the 2nd box.....Now I have delete button below every box...so if i want then i can delete any image before upload.

    First I would like to know

    1.is it possible to upload more than one image via single input(one by one)...if so then i think i have to keep the filenames in a array.

    2.if the selected filenames are in array then how could i post that array via form (I am using php as a serverside language)

    Please direct me in a right direction so that it works.......thanks all of you for your earnest contribution in advance.

    Luv
    Raj.

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Not sure if this could be done simply using javascript.

    1 - You would have to use some sort of server-side language to upload the images (even in a temporary state).

    2 (outside of the javascript item) - You would not be able to use just one file element (in the form) for the upload of mulitple items; unless you uploaded the items one at a time (then you could use hidden fields to upload mulitple items).

    Either way, hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Feb 2007
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi

    Thanks for your post.

    1 - You would have to use some sort of server-side language to upload the images (even in a temporary state).
    yes i am using php

    2 (outside of the javascript item) - You would not be able to use just one file element (in the form) for the upload of mulitple items; unless you uploaded the items one at a time (then you could use hidden fields to upload mulitple items).
    regarding this one I have one url where i saw how the multiple images are uploading.But failed while trying to display the images before the final submit button is clicked.

    here is the url:

    http://the-stickman.com/web-developm...-file-element/

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
  •