Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error in an uploading script

Status
Not open for further replies.

psyren

Technical User
Jul 21, 2003
22
SG
I got a problem in the uploading script. Actually the uploading works very well but there's one slight problem that i couldnt debug it... whenever i upload a file into my server site it prompts out a small error window stating there's a runtime error has occurred and askin me do i wish to debug. But i couldnt find the line or which line i have to debug. I tried to use testpad to find the error but seems the error is beyond the line of the document. So if anyone could knoe point out whuts da mistake i make?
Well this is the page where i make the upload part. Thanks!! MuCh appreciated!!

<!-- #include file = &quot;../../includes/header-includes.asp&quot; -->
<!-- #include File = &quot;_adminBar.asp&quot; -->
<br>
<%
If Request.Form(&quot;favDesc&quot;) <> &quot;&quot; Then
Dim objFavRS
Set objFavRS = Server.CreateObject(&quot;ADODB.RecordSet&quot;)
objFavRS.Open &quot;INSERT INTO favourites(linkDesc, httpLink, [date], userID) VALUES('&quot; & Request.Form(&quot;favDesc&quot;) & &quot;','&quot; & Request.Form(&quot;favHttp&quot;) & &quot;',#&quot; & Date() & &quot;#,&quot; & Session(&quot;userID&quot;) & &quot;)&quot;, objConn, 1, 2
Set objFavRS = Nothing
End if
%>
<script language=&quot;JavaScript&quot; type=&quot;text/JavaScript&quot;>
<!--

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf(&quot;?&quot;))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_setTextOfTextfield(objName,x,newText) { //v3.0
var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//-->
</script>
<form action=&quot;&quot; method=&quot;post&quot; name=&quot;fmFav&quot; id=&quot;fmFav&quot;>
<table width=&quot;400&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td valign=&quot;top&quot; class=&quot;rowHdr&quot; align=&quot;left&quot; width=&quot;10&quot;><img src=&quot;assets/graphix/hpPortal/top_left_trans_small.gif&quot; width=10 height=10 border=&quot;0&quot;></td>
<td width=&quot;100%&quot; class=&quot;rowHdr&quot;>Add Favourites</td>
<td valign=&quot;top&quot; class=&quot;rowHdr&quot; align=&quot;right&quot; width=&quot;10&quot;><img src=&quot;assets/graphix/hpPortal/top_right_trans.gif&quot; width=10 height=20 border=&quot;0&quot;></td>
</tr>
<tr valign=&quot;middle&quot;>
<td height=&quot;10&quot; colspan=&quot;3&quot; align=&quot;center&quot; class=&quot;Regular&quot;><img src=&quot;assets/graphix/hpPortal/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td colspan=&quot;3&quot; class=&quot;Regular&quot;><table width=&quot;100%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td align=&quot;center&quot;>
<table width=&quot;96%&quot; border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;>
<tr>
<td width=&quot;80&quot; valign=&quot;top&quot; class=&quot;Regular&quot;>Description</td>
<td class=&quot;Regular&quot;><input name=&quot;favDesc&quot; type=&quot;text&quot; id=&quot;favDesc&quot; size=&quot;60&quot; maxlength=&quot;255&quot; style=&quot;FONT-SIZE: xx-small;&quot;></td>
</tr>
<tr>
<td width=&quot;80&quot; valign=&quot;top&quot; class=&quot;Regular&quot;>HTTP Link:</td>
<td class=&quot;Regular&quot;><input name=&quot;favHttp&quot; type=&quot;text&quot; id=&quot;favHttp&quot; value=&quot;&quot; size=&quot;60&quot; maxlength=&quot;255&quot; style=&quot;FONT-SIZE: xx-small;&quot;></td>
</tr>
<tr align=&quot;center&quot; valign=&quot;middle&quot;>
<td height=&quot;5&quot; class=&quot;Regular&quot;><img src=&quot;assets/graphix/hpPortal/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
<td height=&quot;5&quot; class=&quot;Regular&quot;><img src=&quot;assets/graphix/hpPortal/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td width=&quot;80&quot; valign=&quot;top&quot; class=&quot;Regular&quot;>&nbsp;</td>
<td align=&quot;right&quot; class=&quot;Regular&quot;>
<p>
<input Name=&quot;Action&quot; type=&quot;submit&quot; style=&quot;font-size:8pt;&quot; onClick=&quot;MM_validateForm('favDesc','','R','favHttp','','R');return document.MM_returnValue&quot; value=&quot;Post News&quot;>
</p>
<p align=&quot;left&quot;><font size=&quot;-3&quot; face=&quot;Verdana, Arial, Helvetica, sans-serif&quot;>*Please
include with &quot; in the HTTP Link textfield</font></p></td>
</tr>
<tr align=&quot;center&quot; valign=&quot;middle&quot;>
<td height=&quot;5&quot; class=&quot;Regular&quot;><img src=&quot;assets/graphix/hpPortal/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
<td height=&quot;5&quot; class=&quot;Regular&quot;><img src=&quot;assets/graphix/hpPortal/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr valign=&quot;middle&quot;>
<td height=&quot;5&quot; colspan=&quot;3&quot; align=&quot;center&quot; class=&quot;Regular&quot;><img src=&quot;assets/graphix/hpPortal/spacer.gif&quot; width=&quot;1&quot; height=&quot;1&quot;></td>
</tr>
<tr>
<td valign=&quot;bottom&quot; class=&quot;Regular&quot; align=&quot;left&quot; width=&quot;10&quot;><img src=&quot;assets/graphix/hpPortal/btm_left_trans.gif&quot; width=10 height=10 border=&quot;0&quot;></td>
<td width=&quot;100%&quot; class=&quot;Regular&quot;>&nbsp;</td>
<td valign=&quot;bottom&quot; class=&quot;Regular&quot; align=&quot;right&quot; width=&quot;10&quot;><img src=&quot;assets/graphix/hpPortal/btm_right_trans.gif&quot; width=10 height=10 border=&quot;0&quot;></td>
</tr>
</table>
</form>
<!-- #include file = &quot;../../includes/footer-includes.asp&quot; -->
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top