Progress bar for upload - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > JavaScript » Progress bar for upload


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 02-26-2007   #1 (permalink)
qing
Member
 
Join Date: Feb 2007
Posts: 44
Default Progress bar for upload

My upload code:

<form enctype="multipart/form-data" action="?newup=1" method="post" id=form1 name=form1>
<input type=file name=file>
<input type=submit value=submit name=submit>
</form>
<%
If Request.QueryString("newup") = 1 Then
asdfg = Request.BinaryRead(Request.TotalBytes)
LenBinary = LenB(asdfg)
If LenBinary > 0 Then
Set RST = CreateObject("ADODB.Recordset")
RST.Fields.Append "myBinary", 201, LenBinary
RST.Open
RST.AddNew
RST("myBinary").AppendChunk asdfg
RST.Update
strData = RST("myBinary")
RST.Close
Set RST = Nothing
End If
'FileName
fnbgn = instr(1, strData, "file") + 17
fnend = instr(fnbgn, strData, chr(34))
FileName = Mid(strData,fnbgn,(fnend - fnbgn))
'BinaryData
dbbgn = instr(1, strData, "file")
dbbgn = instr(dbbgn, strData, chr(10)) + 1
dbbgn = instr(dbbgn, strData, chr(10)) + 1
dbbgn = instr(dbbgn, strData, chr(10)) + 1
dbend = instr(dbbgn, strData, "-----") - 2
BinaryData = Mid(strData,dbbgn,(dbend - dbbgn))
FileSize = Len(BinaryData)

Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.OpenTextFile(Server.MapPath("\")&"\"&fso.GetFi leName(FileName), 2, True)
f.Write BinaryData
Set f = Nothing
Set fso = Nothing
End If

Response.Write "Upload Ok."
%>

I Need a progress bar for this code.

Example Script : Progress Bar

Can you take a look above link?

Thanks.
qing is offline   Reply With Quote


Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


footer left
All times are GMT. The time now is 12:48 PM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Car Credit | Savings | Debt Consolidation | Facebook proxy list | Homeowner Loans

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49