1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Please help progress bar for uploading

Discussion in 'C#' started by jojo1_, Dec 11, 2007.

  1. #1
    Hi, i am new to asp scripting and i am looking for a true as can be progress bar as part of my upload script. i have two scripts, the first takes the files;

    <FORM ACTION=upload.asp METHOD=POST enctype="multipart/form-data" id="Form1" name=Form1>
    <table style="height: 1px;" align="center" border="1"
    bordercolor="silver" cellpadding="2" cellspacing="2">
    <tbody>
    <tr>
    <td style="width: 448px;" unselectable="off"
    align="center" bgcolor="#f7f7f7">&nbsp;Select
    Files</td>
    </tr>
    <tr>
    <td style="width: 448px; height: 145px;"
    unselectable="off" align="center"> <br />
    <input class="stdInput" name="file" type="file" /><br />
    <input class="stdInput" name="file1"
    type="file" /><br />
    <input class="stdInput" name="file2"
    type="file" /><br />
    <input class="stdInput" name="file3"
    type="file" /><br />
    <input class="stdInput" name="file4"
    type="file" /> <br />
    <br />
    </td>
    </tr>
    <tr>
    <td style="width: 448px;" unselectable="off"
    align="right"><input value="Submit" type="submit" /></td>
    </tr>
    </tbody>
    </table>
    </form>
    and the second, seperate script performs the upload function(upload.asp).
    i would like to place the progress bar at the bottom of the form, below the submit button, so as when the submit button is pressed the upload begins and the progress bar starts running on this first script.can anyone help with the coding of the progress bar and in its position in the above form

    Thanks in advance
     
    jojo1_, Dec 11, 2007 IP
  2. urstop

    urstop Peon

    Messages:
    224
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I dont think there is any staight forward simple solution for it. You will have to use AJAX or something similar to that so that you can poll the status of the uploads without refresshing your page and update the progress bar accordingly.
     
    urstop, Dec 12, 2007 IP
  3. T-P-X

    T-P-X Peon

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I also think the Ajax is good solution here.
     
    T-P-X, Dec 12, 2007 IP
  4. jojo1_

    jojo1_ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi, guys
    I am not yet up to speed with .net, is there any other way i can do this in asp or html
     
    jojo1_, Dec 12, 2007 IP
  5. ashrafweb

    ashrafweb Member

    Messages:
    67
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #5
    i tried uploading code with ajax but its not working
    very big problems happen!!
     
    ashrafweb, Dec 13, 2007 IP
  6. suchiarya

    suchiarya Peon

    Messages:
    213
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I have never developed a progress bar for ASP it can be a brain surgery. If I had to do something for this then I might start off with iFrame/Form so that you have control on the main page.

    Next As you are uploading file(s) I would recommed following steps

    1. Get the speed at which the client machine and server are connected
    2. Get total size of all files
    3. Get estimated time it will take to upload
    4. Mark it up by 10% to network speed fluctuations

    NOW set the timer on the progress bar so you know exactly how much to increment on every second. This will have to be controlled at clients end now with dynamically written JavaScript.

    Hope this helps. I do not see any short n sweet solution to the requirement
     
    suchiarya, Dec 13, 2007 IP
  7. jojo1_

    jojo1_ Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    I found something with html, it only handles one file, but i am sure how i could implement it, any suggestions/solutions, it at the following link
    http://www.websupergoo.com/helpupload/source/3-examples/progressupload.htm
     
    jojo1_, Dec 13, 2007 IP
  8. AndyFarrell

    AndyFarrell Peon

    Messages:
    89
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    AndyFarrell, Dec 13, 2007 IP