fana3687 0 Newbie Poster

hi. i need help. when i preview deleteKom.asp there is no error on it. here is the coding.

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/data1.asp" -->
<%
Dim RSKom
Dim RSKom_numRows

Set RSKom = Server.CreateObject("ADODB.Recordset")
RSKom.ActiveConnection = MM_data1_STRING
RSKom.Source = "SELECT * FROM tblKom"
RSKom.CursorType = 0
RSKom.CursorLocation = 2
RSKom.LockType = 1
RSKom.Open()
RSKom_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = -1
Repeat1__index = 0
RSKom_numRows = RSKom_numRows + Repeat1__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset="iso-8859-1"" />
<title>SAPURA::Portal ACV 300 Simulator</title>

<style type="text/css">
<!--
.style1 {font-weight: bold}
-->
.main {
width:150px;
border:1px solid black;
}

.month {
background-color:black;
font:bold 12px verdana;
color:white;
}

.daysofweek {
background-color:gray;
font:bold 12px verdana;
color:white;
}

.days {
font-size: 12px;
font-family:verdana;
color:black;
background-color: lightyellow;
padding: 2px;
}

.days #today{
font-weight: bold;
color: red;
}
</style>
<script type="text/javascript" src="basiccalendar.js">

</script>
</head>

<body>
<form name="f" method="post" action="deleteaction.asp">
  <table width="1193" height="789" border="0" background="images/adnan_4.jpg">
    <tr>
      <td width="185" height="134"><img src="images/logo sapura.gif" alt="logo sapura" width="183" height="72" /></td>
      <td width="843"><div align="center"><img src="images/banner.jpg" alt="banner" width="830" height="87" /></div></td>
      <td width="143"><div align="center"><img src="images/defence.jpg" alt="defence" width="131" height="91" /></div></td>
    </tr>
    <tr>
      <td height="246"></td>
      <td><div align="center">
        <table width="708" height="62" border="1" align="center">
          <tr bgcolor="#66FFCC">
            <td width="60">&nbsp;</td>
            <td width="166"><div align="center"><strong>Fullname</strong></div></td>
            <td width="220"><div align="center"><strong>Email</strong></div></td>
            <td width="234"><div align="center"><strong>Comment</strong></div></td>
          </tr>
          <% 
While ((Repeat1__numRows <> 0) AND (NOT RSKom.EOF)) 
%>
  <tr>
                <td><div align="center">
                    <input type="checkbox" name="del" value="<%=(RSKom.Fields.Item("ID").Value)%>">
                  </div></td>
    <td><%=(RSKom.Fields.Item("Fullname").Value)%></td>
    <td><%=(RSKom.Fields.Item("Email").Value)%></td>
    <td><%=(RSKom.Fields.Item("Comment").Value)%></td>
  </tr>
  <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  RSKom.MoveNext()
Wend
%>
</table>
        <p align="center">
          <input type="submit" value="Delete">
        </p>
      <p align="center">&nbsp;</p></td>
   				<td><script type="text/javascript">	<!--Calendar-->
						var todaydate=new Date()
						var curmonth=todaydate.getMonth()+1 //get current month (1-12)
						var curyear=todaydate.getFullYear() //get current year
						document.write(buildCal(curmonth ,curyear, "main", "month", "daysofweek", "days", 1));
		  			 </script>
      				<div align="center">
        			<script src="http://www.clocklink.com/embed.js"></script><script type="text/javascript" 
					language="JavaScript">obj=new Object;obj.clockfile="otsukashokai001-navy.swf";obj.TimeZone="Malaysia_KualaLumpur";
					obj.width=100;obj.height=100;obj.wmode="transparent";showClock(obj);</script></td>	<!--Time-->

    </tr>
    <tr>
      <td height="199"><table width="106" border="0" align="center">
        <tr>
          <td width="109"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="145" height="30">
            <param name="movie" value="images/bHomeAdmn.swf" />
            <param name="quality" value="high" />
            <embed src="images/bHomeAdmn.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="105" height="23" ></embed>
          </object></td>
        </tr>
        <tr>
          <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="145" height="30" align="middle" title="bComment">
            <param name="BGCOLOR" value="" />
            <param name="movie" value="images/bViewCommAdmn.swf" />
            <param name="quality" value="high" />
            <embed src="images/bViewCommAdmn.swf" width="128" height="29" align="middle" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ></embed>
          </object></td>
        </tr>
        <tr>
          <td><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="145" height="30">
            <param name="BGCOLOR" value="" />
            <param name="movie" value="images/blogoutAdmn.swf" />
            <param name="quality" value="high" />
            <embed src="images/blogoutAdmn.swf" quality="high" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="105" height="23" ></embed>
          </object>
        </td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td>&nbsp;</td>
        </tr>
      </table></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td height="200">&nbsp;</td>
      <td><a href="http://www.google.com/">Google</a> <br />
        <input name="q" framewidth="4" size="20" />
        <br />
        <input name="submit" type="submit" value="Search" />
        <input name="clear" type="reset" value="Clear" />   </td>
      <td>&nbsp;</td>
    </tr>
  </table>
<script language="JavaScript">function infoscroll(seed,looped){var text1 = "Welcome to Portal ACV 300 Simulator";
var msg=text1;var putout = " ";
        var c   = 1;
	if (looped > 10) {
		window.status="Welcome to Portal ACV 300 Simulator";
	}
	else if (seed > 100) 
{
                seed--;
                var cmd="infoscroll(" + seed + "," + looped + ")";
                timerTwo=window.setTimeout(cmd,100);
        }
        else if (seed <= 100 && seed > 0) {
                for (c=0 ; c < seed ; c++) {
                        putout+=" ";
                }
putout+=msg.substring(0,100-seed);	
                seed--;
                var cmd="infoscroll(" + seed + "," + looped + ")";
                    window.status=putout;
                timerTwo=window.setTimeout(cmd,100);
        }
        else if (seed <= 0) 
{
                if (-seed < msg.length) 
{
                        putout+=msg.substring(-seed,msg.length);
                        seed--;
                        var cmd="infoscroll(" + seed + "," + looped + ")";
                        window.status=putout;
                        timerTwo=window.setTimeout(cmd,100); // 100
                }
                else {
                        window.status=" ";
			looped += 1;
			var cmd = "infoscroll(100," + looped + ")";
                       timerTwo=window.setTimeout(cmd,75); // 75
                }
        }
}
// -->
<!--
infoscroll(100,1)
// -->
</script>
  
</form>
</body>
</html>
<%
RSKom.Close()
Set RSKom = Nothing
%>

but there was an error at deleteaction.asp

here is the coding...

<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/data1.asp" -->
<%
Dim RSKom
Dim RSKom_numRows

Set RSKom = Server.CreateObject("ADODB.Recordset")
RSKom.ActiveConnection = MM_data1_STRING
RSKom.Source = "SELECT * FROM tblKom"
RSKom.CursorType = 0
RSKom.CursorLocation = 2
RSKom.LockType = 1
RSKom.Open()
RSKom_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
RSKom_numRows = RSKom_numRows + Repeat1__numRows
%>
<%
strIDs = Replace(Request.Form, "&del=", ",")
strIDs = Replace(strIDs, "del=", "")
arrIDs = Split(strIDs, ",")
%>
<%
For intCount = 0 To UBound(arrIDs)
 RSKom.Filter = "ID = " & arrIDs(intCount)    error occured here
 RSKom.Delete
 Next
RSKom.Close()
Response.Redirect("deleteKom.asp") 
%>

<%
RSKom.Close()
Set RSKom = Nothing
%>

i don't know what is wrong. hope can help me....