Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/10/2010, 10:40
Avatar de oscarios
oscarios
 
Fecha de Ingreso: septiembre-2004
Mensajes: 186
Antigüedad: 20 años, 6 meses
Puntos: 2
activar link al cargar boton

hola buenos dias, esta vez recurro a ustedes para solicitar su valiosa ayuda en esto:
tengo una pagina con datos de una base de datos y un boton que pasa el id de ese registro a otra pagina de detalle, lo que deseo es que esto sea oculto para el usuario y que el boton que pasa los valores se active automaticamente sin que el usuario le de clic.
Código ASP:
Ver original
  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
  2. <!--#include file="Connections/xxxxxxxx.asp" -->
  3. <%
  4. Dim Recordset1
  5. Dim Recordset1_cmd
  6. Dim Recordset1_numRows
  7.  
  8. Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
  9. Recordset1_cmd.ActiveConnection = MM_conngdc_STRING
  10. Recordset1_cmd.CommandText = "SELECT * FROM requisicion ORDER BY Idrequi DESC"
  11. Recordset1_cmd.Prepared = true
  12.  
  13. Set Recordset1 = Recordset1_cmd.Execute
  14. Recordset1_numRows = 0
  15. %>
  16. <%
  17. Dim MM_paramName
  18. %>
  19. <%
  20. ' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
  21.  
  22. Dim MM_keepNone
  23. Dim MM_keepURL
  24. Dim MM_keepForm
  25. Dim MM_keepBoth
  26.  
  27. Dim MM_removeList
  28. Dim MM_item
  29. Dim MM_nextItem
  30.  
  31. ' create the list of parameters which should not be maintained
  32. MM_removeList = "&index="
  33. If (MM_paramName <> "") Then
  34.   MM_removeList = MM_removeList & "&" & MM_paramName & "="
  35. End If
  36.  
  37. MM_keepURL=""
  38. MM_keepForm=""
  39. MM_keepBoth=""
  40. MM_keepNone=""
  41.  
  42. ' add the URL parameters to the MM_keepURL string
  43. For Each MM_item In Request.QueryString
  44.   MM_nextItem = "&" & MM_item & "="
  45.   If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
  46.     MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  47.   End If
  48. Next
  49.  
  50. ' add the Form variables to the MM_keepForm string
  51. For Each MM_item In Request.Form
  52.   MM_nextItem = "&" & MM_item & "="
  53.   If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
  54.     MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  55.   End If
  56. Next
  57.  
  58. ' create the Form + URL string and remove the intial '&' from each of the strings
  59. MM_keepBoth = MM_keepURL & MM_keepForm
  60. If (MM_keepBoth <> "") Then
  61.   MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
  62. End If
  63. If (MM_keepURL <> "")  Then
  64.   MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
  65. End If
  66. If (MM_keepForm <> "") Then
  67.   MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
  68. End If
  69.  
  70. ' a utility function used for adding additional parameters to these strings
  71. Function MM_joinChar(firstItem)
  72.   If (firstItem <> "") Then
  73.     MM_joinChar = "&"
  74.   Else
  75.     MM_joinChar = ""
  76.   End If
  77. End Function
  78. %>
  79. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  80. <html xmlns="http://www.w3.org/1999/xhtml">
  81. <head>
  82. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  83. <title>Documento sin título</title>
  84. </head>
  85.  
  86. <body>
  87. <table width="100%" border="0" cellspacing="0" cellpadding="2">
  88.   <tr>
  89.     <td>Procesando...</td>
  90.     <td>&nbsp;</td>
  91.     <td>&nbsp;</td>
  92.     <td>&nbsp;</td>
  93.   </tr>
  94.   <tr>
  95.     <td><%=(Recordset1.Fields.Item("Idrequi").Value)%></td>
  96.     <td><%=(Recordset1.Fields.Item("estado").Value)%></td>
  97.     <td><%=(Recordset1.Fields.Item("fecha").Value)%></td>
  98.     <td><a href="requisicion3.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "Idrequi=" & Recordset1.Fields.Item("Idrequi").Value %>"><img src="imagen.gif" width="10" height="10" border="0" /></a></td>
  99.   </tr>
  100. </table>
  101. <p>&nbsp;</p>
  102. <p>&nbsp;</p>
  103. </body>
  104. </html>
  105. <%
  106. Recordset1.Close()
  107. Set Recordset1 = Nothing
  108. %>

desde ya mil gracias por su ayuda!!!
__________________
oscariosdw