ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here
  #1  
Old June 14th, 2003, 12:43 AM
destravation destravation is offline
cr-creations.co.uk
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Manchester, England
Posts: 229 destravation User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 23 m 35 sec
Reputation Power: 7
Send a message via AIM to destravation Send a message via Yahoo to destravation
upload script errors, i have no idea

i found this very simple but exactly what i wanted upload script for asp.
i really wanted one in php but it involves too much which i can do on my windows apache system as far as i know. anyway.
i have the mod_perl mod_asp etc etc bundle of windows port of apache.

i dont understand asp at all or know how to program it. i just need an upload script with progress bar. like this it works in the demo just fine.

the script seems to return 500 errors to the browser and the error log for server includes the following...

Code:
[Sat Jun 14 05:34:25 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressbar.asp line 11, near ") <--> theProgress" <--> 
[Sat Jun 14 05:34:25 2003] [error] [asp] [2892] [debug] 	(Missing operator before theProgress?) <--> 
[Sat Jun 14 05:34:25 2003] [error] [asp] [2892] [error] error compiling progressbar.asp: syntax error at f:/apache/asp/progressbar.asp line 11, near ") <--> theProgress" <--> , f:/Apache/Perl/site/lib/Apache/ASP.pm line 1432
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressupload.asp line 3, near "10000 <--> Server" <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] 	(Missing operator before Server?) <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressupload.asp line 5, near "300 <--> Set" <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] 	(Missing operator before Set?) <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressupload.asp line 6, near ") <--> theForm" <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] 	(Missing operator before theForm?) <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressupload.asp line 8, near "8000000 <--> theForm" <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] 	(Missing operator before theForm?) <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressupload.asp line 9, near ") <--> Set" <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] 	(Missing operator before Set?) <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] Bareword found where operator expected at f:/apache/asp/progressupload.asp line 10, near ") <--> If" <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [debug] 	(Missing operator before If?) <--> 
[Sat Jun 14 05:34:54 2003] [error] [asp] [2892] [error] error compiling progressupload.asp: syntax error at f:/apache/asp/progressupload.asp line 3, near "10000 <--> Server" <--> , f:/Apache/Perl/site/lib/Apache/ASP.pm line 1432


the two asp script files and one html file these are as below....

file 1 "progressupload.asp"

Code:
<%
Response.Expires = -10000
Server.ScriptTimeOut = 300

Set theForm = Server.CreateObject("Upload.Form")
theForm.Overwrite = True
theForm.MaxUploadSize = 8000000
theForm.ID = Request.QueryString("ID")
Set theField = theForm.Files("filefield1")
If theField.FileExists Then
  theField.Save theField.FileName
End If
%>

<html>
<body>
Upload Complete...
</body>
</html>



file 2 "progressbar.asp"

Code:
<%@EnableSessionState=False%>
<html>
<head>
<title>Progress...</title>
<meta http-equiv="expires" content="Tue, 01 Jan 1981 01:00:00 GMT">
<meta http-equiv=refresh content="2,progressbar.asp?ID=<%=Request.QueryString("ID")%>">

<%
On Error Resume Next
Set theProgress = Server.CreateObject("Upload.Progress")
theProgress.ID = Request.QueryString("ID")
%>

<script language="javascript">
<!--
if (<% =theProgress.PercentDone %> == 100) top.close();
//-->
</script>

</head>
<body bgcolor="#CCCCCC">

<table border="0" width="100%">
  <tr>
    <td><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>Uploading:</b></font></td>
  </tr>
  <tr bgcolor="#999999">
    <td>
      <table border="0" width="<%=theProgress.PercentDone%>%" cellspacing="1" bgcolor="#0033FF">
        <tr>
          <td><font size="1">&nbsp;</font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>
      <table border="0" width="100%">
        <tr>
          <td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Estimated time left:</font></td>
          <td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
          	<%=Int(theProgress.SecondsLeft / 60)%> min
		<%=theProgress.SecondsLeft Mod 60%> secs
		(<%=Round(theProgress.BytesDone / 1024, 1)%> KB of
		<%=Round(theProgress.BytesTotal / 1024, 1)%> KB uploaded)</font></td>
        </tr>
        <tr>
          <td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
		Transfer Rate:</font></td>
          <td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
		<%=Round(theProgress.BytesPerSecond/1024, 1)%> KB/sec</font></td>
        </tr>
        <tr>
          <td><font face="Verdana, Arial, Helvetica, sans-serif" size="1">Information:</font></td>
          <td><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><%=theProgress.Note%></font></td>
        </tr>
      </table>
    </td>
  </tr>
  <tr></tr>
</table>

</body>
</html>


finally file 3 "progressupload.htm"

Code:
<html>
<body>

<script language="javascript">
<!--
function DoUpload() {
	theFeats = "height=120,width=500,location=yes,menubar=no,resizable=yes,scrollbars=no,status=no,toolbar=no";
	theUniqueID = (new Date()).getTime() % 1000000000;
	window.open("progressbar.asp?ID=" + theUniqueID, theUniqueID, theFeats);
	document.myform.action = "progressupload.asp?ID=" + theUniqueID;
	document.myform.submit();
}
//-->
</script>

<form name="myform" method="post" action="progressupload.asp" enctype="multipart/form-data">
<input type="file" name="filefield1"><br>
<input type="button" name="dosubmit" value="Upload" OnClick="DoUpload()"><br>
</form>

</body>
</html>


Thank you very much for any help in advance. as i am i total noobie to asp

regards
rob

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > upload script errors, i have no idea


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway