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 = "../../includes/header-includes.asp" -->
<!-- #include File = "_adminBar.asp" -->
<br>
<%
If Request.Form("favDesc"
<> "" Then
Dim objFavRS
Set objFavRS = Server.CreateObject("ADODB.RecordSet"
objFavRS.Open "INSERT INTO favourites(linkDesc, httpLink, [date], userID) VALUES('" & Request.Form("favDesc"
& "','" & Request.Form("favHttp"
& "',#" & Date() & "#," & Session("userID"
& "
", objConn, 1, 2
Set objFavRS = Nothing
End if
%>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"
)>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
; return x;
}
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//-->
</script>
<form action="" method="post" name="fmFav" id="fmFav">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="rowHdr" align="left" width="10"><img src="assets/graphix/hpPortal/top_left_trans_small.gif" width=10 height=10 border="0"></td>
<td width="100%" class="rowHdr">Add Favourites</td>
<td valign="top" class="rowHdr" align="right" width="10"><img src="assets/graphix/hpPortal/top_right_trans.gif" width=10 height=20 border="0"></td>
</tr>
<tr valign="middle">
<td height="10" colspan="3" align="center" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3" class="Regular"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80" valign="top" class="Regular">Description</td>
<td class="Regular"><input name="favDesc" type="text" id="favDesc" size="60" maxlength="255" style="FONT-SIZE: xx-small;"></td>
</tr>
<tr>
<td width="80" valign="top" class="Regular">HTTP Link:</td>
<td class="Regular"><input name="favHttp" type="text" id="favHttp" value="" size="60" maxlength="255" style="FONT-SIZE: xx-small;"></td>
</tr>
<tr align="center" valign="middle">
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td width="80" valign="top" class="Regular"> </td>
<td align="right" class="Regular">
<p>
<input Name="Action" type="submit" style="font-size:8pt;" onClick="MM_validateForm('favDesc','','R','favHttp','','R');return document.MM_returnValue" value="Post News">
</p>
<p align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">*Please
include with " in the HTTP Link textfield</font></p></td>
</tr>
<tr align="center" valign="middle">
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr valign="middle">
<td height="5" colspan="3" align="center" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td valign="bottom" class="Regular" align="left" width="10"><img src="assets/graphix/hpPortal/btm_left_trans.gif" width=10 height=10 border="0"></td>
<td width="100%" class="Regular"> </td>
<td valign="bottom" class="Regular" align="right" width="10"><img src="assets/graphix/hpPortal/btm_right_trans.gif" width=10 height=10 border="0"></td>
</tr>
</table>
</form>
<!-- #include file = "../../includes/footer-includes.asp" -->
Well this is the page where i make the upload part. Thanks!! MuCh appreciated!!
<!-- #include file = "../../includes/header-includes.asp" -->
<!-- #include File = "_adminBar.asp" -->
<br>
<%
If Request.Form("favDesc"
Dim objFavRS
Set objFavRS = Server.CreateObject("ADODB.RecordSet"
objFavRS.Open "INSERT INTO favourites(linkDesc, httpLink, [date], userID) VALUES('" & Request.Form("favDesc"
Set objFavRS = Nothing
End if
%>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"
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
}
function MM_setTextOfTextfield(objName,x,newText) { //v3.0
var obj = MM_findObj(objName); if (obj) obj.value = newText;
}
//-->
</script>
<form action="" method="post" name="fmFav" id="fmFav">
<table width="400" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="rowHdr" align="left" width="10"><img src="assets/graphix/hpPortal/top_left_trans_small.gif" width=10 height=10 border="0"></td>
<td width="100%" class="rowHdr">Add Favourites</td>
<td valign="top" class="rowHdr" align="right" width="10"><img src="assets/graphix/hpPortal/top_right_trans.gif" width=10 height=20 border="0"></td>
</tr>
<tr valign="middle">
<td height="10" colspan="3" align="center" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td colspan="3" class="Regular"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="96%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="80" valign="top" class="Regular">Description</td>
<td class="Regular"><input name="favDesc" type="text" id="favDesc" size="60" maxlength="255" style="FONT-SIZE: xx-small;"></td>
</tr>
<tr>
<td width="80" valign="top" class="Regular">HTTP Link:</td>
<td class="Regular"><input name="favHttp" type="text" id="favHttp" value="" size="60" maxlength="255" style="FONT-SIZE: xx-small;"></td>
</tr>
<tr align="center" valign="middle">
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td width="80" valign="top" class="Regular"> </td>
<td align="right" class="Regular">
<p>
<input Name="Action" type="submit" style="font-size:8pt;" onClick="MM_validateForm('favDesc','','R','favHttp','','R');return document.MM_returnValue" value="Post News">
</p>
<p align="left"><font size="-3" face="Verdana, Arial, Helvetica, sans-serif">*Please
include with " in the HTTP Link textfield</font></p></td>
</tr>
<tr align="center" valign="middle">
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
<td height="5" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
<tr valign="middle">
<td height="5" colspan="3" align="center" class="Regular"><img src="assets/graphix/hpPortal/spacer.gif" width="1" height="1"></td>
</tr>
<tr>
<td valign="bottom" class="Regular" align="left" width="10"><img src="assets/graphix/hpPortal/btm_left_trans.gif" width=10 height=10 border="0"></td>
<td width="100%" class="Regular"> </td>
<td valign="bottom" class="Regular" align="right" width="10"><img src="assets/graphix/hpPortal/btm_right_trans.gif" width=10 height=10 border="0"></td>
</tr>
</table>
</form>
<!-- #include file = "../../includes/footer-includes.asp" -->