La función me redirecciona a otra página:
Código:
function desblockear(){
return window.location="desblockeo.asp?tabla=zonas&campo=id&tipo=N&fila=" + window.document.getElementById('id').value +"&pag=abmzonas.asp?id=" + window.document.getElementById('id').value +"";
}
Y el código de la otra página es el siguiente:
Código:
<!--#include file="Connections/con1.asp" -->
<%
desblockear request.QueryString("tabla"),request.QueryString("campo"),request.QueryString("tipo"),request.QueryString("fila"),request.QueryString("pag")
response.Redirect request.QueryString("pag")
Function desblockear (tabla, campo_id, tipo_campo_id, registro, pagina)
Dim rs
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_con1_STRING
if tipo_campo_id = "T" then 'texto
rs.Source ="SELECT BLOCK FROM " & tabla & " WHERE " & campo_id & "='" & registro & "'"
elseif tipo_campo_id = "N" then 'numerico
rs.Source ="SELECT BLOCK FROM " & tabla & " WHERE " & campo_id & "=" & registro
end if
rs.CursorType = 2
rs.CursorLocation = 3
rs.LockType = 3
rs.Open()
rs("BLOCK") = 0
rs.update
rs.close
set rs = nothing
End Function
%>
Gracias!