请各位高手帮忙看看,在线等。
我明明觉得没有问题了的,可是就是不成功。现在的情况是,我想点击下面框里面的“禁用”,则就会将数据库里的status置为0.
本来觉得程序没什么问题。可是就是实现不了。而且感觉好像还没有调用forbidRegion()函数。不知是什么原因。。。请各位帮帮忙。。。。
<%
sub forbidRegion()
'-----------------------------------------------
%>
<%
tbName= "region "
dim regionId
regionId=trim(request( "rgId "))
set conn=server.CreateObject( "ADODB.connection ")
conn.open conn_str
set rs=server.createobject( "adodb.recordset ")
sql= "select * from " & tbName & " where regionId= ' " ®ionId& " ' "
rs.open sql,conn,2,3
rs( "status ")=0
rs.update
rs.close
set rs=nothing
conn.close
set conn=nothing
'OKInfo= "修改成功! "
'writeOKInfo(OKInfo)
%>
<%
end sub
'-----------------------------------------------
%>
<%
tbName= "region "
provinceId=trim(request.form( "province3 "))
set conn=server.CreateObject( "ADODB.connection ")
conn.open conn_str
set rs=server.createobject( "adodb.recordset ")
sql = "select * from " & tbName & " where status=1 and type=2 and substring(parentId,1,2)= ' " & left(provinceId,2) & " ' "
rs.open sql, conn, 1, 1
do while not rs.eof
%>
<tr>
<td class= "view " width= "156 ">
<input type= "text " name= "region <%=trim(rs( "regionId "))%> " value= " <%=trim(rs( "region "))%> " id= "region <%=trim(rs( "regionId "))%> " readonly> </td>
<td class= "view " width= "169 "> </td>
<td class= "view " width= "91 " id= "td <%=trim(rs( "regionId "))%> "> <a href= "javascript:update( <%=trim(rs( "regionId "))%> ) "> 修改 </a> </td>
<td class= "view " width= "81 "> <a href= " <%=MKName%> ?action=forbidRegion&rgId= <%=trim(rs( "regionId "))%> "> 禁用 </a> </td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
----