物品拖动后无法保存拖动后的位置,刷新后又回到了原来的位置,不知道哪里出了问题,请大家帮忙改下,谢谢!
<%
set rs_obj=server.CreateObject("adodb.recordset" )
set rs_2=server.CreateObject("adodb.recordset" )
sql="select * from room_obj where username='"&Session("Current_user")&"' and selected=1 order by id desc"
rs_obj.open sql,conn,1,3
for i=1 to rs_obj.recordcount
id=rs_obj("id")
posleft="posleft_"& id
postop="postop_"& id
pos_left=request.Form(posleft)
pos_top=request.Form(postop)
if pos_left="" then
pos_left=rs_obj("pos_left")
end if
if pos_top="" then
pos_top=rs_obj("pos_top")
end if
sql3="select pos_left,pos_top from room_obj where id="&id
rs_2.open sql3,conn,1,3
rs_2("pos_left")=pos_left
rs_2("pos_top")=pos_top
rs_2.update
rs_2.close
rs_obj.movenext
next
response.write"<script>alert('恭喜您,设置保存成功!');self.close();parent.reload();</script>"
%>
<%
rs_obj.close
set rs_obj=nothing
set rs_2=nothing
%>