Foros del Web » Programando para Internet » ASP Clásico »

mensaje emergente

Estas en el tema de mensaje emergente en el foro de ASP Clásico en Foros del Web. Hola Amigos Les Tengo Una Consulta Breve, Tengo Un Form De Registro, En El Cual Se Registra Un Usuario, Tengo Un Codigo De Usuario Que ...
  #1 (permalink)  
Antiguo 30/05/2005, 21:55
Avatar de kyo1982  
Fecha de Ingreso: mayo-2005
Mensajes: 71
Antigüedad: 19 años
Puntos: 0
Pregunta Mensaje Emergente

Hola Amigos Les Tengo Una Consulta Breve, Tengo Un Form De Registro, En El Cual Se Registra Un Usuario, Tengo Un Codigo De Usuario Que Genero Con El Sql De Forma Automatico. Ahora Viene El Asunto

La Idea Es Que Despues Que La Persona Se Registra , Le Mande Un Mensaje O Lo Redireccione A Una Pagina (como Salga Mas Facil), Diciendole, (gracias Su Codigo De Usuario Es ##) ##= Valor Generado Por El Sql, Bueno Yo Creo Que Me Explique.

El Que Me Pueda Tirar La Toalla, Mil Gracias, Quienes Mas Que Ustedes Los Expertos.


El Mejor Site Del Mundo Es Este
__________________
Gracias TOTALES :-D
  #2 (permalink)  
Antiguo 31/05/2005, 01:24
Avatar de El_Metallick  
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 7 meses
Puntos: 16
redirecciona a una pagina en la que pongas algo asi

Código:
 usuario = Request.Form("usuario") 
sql="select * From Tabla Where usuario = " & usuario & ""
...
Gracias su código de usuario es <% = rs("codigo") %>
no lo veo tan complicado... si es eso lo que quieres ahi hay una forma de hacerlo... saludos y suerte.
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!

Última edición por El_Metallick; 31/05/2005 a las 02:33
  #3 (permalink)  
Antiguo 31/05/2005, 15:31
Avatar de kyo1982  
Fecha de Ingreso: mayo-2005
Mensajes: 71
Antigüedad: 19 años
Puntos: 0
Pregunta mensaje emergente

hola amigos, les cuento mi problema, tengo un formulario de investigacion, el cod_investigacion lo genera de forma secuencial el sql, por lo cual el usuario no lo introduce, pero el usuario debe saber cual es su cod_investigacion, como le hago para enviarle un mensaje emergente (su codigo es tal), o que me lo mande a una pgina cuando se redireccione........


aqui les pongo el codigo del asunto

***********************
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/galope.asp" -->
<%
' *** Edit Operations: declare variables

Dim MM_editAction
Dim MM_abortEdit
Dim MM_editQuery
Dim MM_editCmd

Dim MM_editConnection
Dim MM_editTable
Dim MM_editRedirectUrl
Dim MM_editColumn
Dim MM_recordId

Dim MM_fieldsStr
Dim MM_columnsStr
Dim MM_fields
Dim MM_columns
Dim MM_typeArray
Dim MM_formVal
Dim MM_delim
Dim MM_altVal
Dim MM_emptyVal
Dim MM_i

MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If

' boolean to abort record edit
MM_abortEdit = false

' query string to execute
MM_editQuery = ""
%>
<%
' *** Insert Record: set variables

If (CStr(Request("MM_insert")) = "form2") Then

MM_editConnection = MM_galope_STRING
MM_editTable = "dbo.Investigacion"
MM_editRedirectUrl = "listo"
MM_fieldsStr = "usuario|value|fecha_ingreso|value|descripcion|val ue"
MM_columnsStr = "usuario|',none,''|[fecha ingreso]|',none,NULL|descripcion|',none,''"

' create the MM_fields and MM_columns arrays
MM_fields = Split(MM_fieldsStr, "|")
MM_columns = Split(MM_columnsStr, "|")

' set the form values
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i)))
Next

' append the query string to the redirect URL
If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then
If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then
MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString
Else
MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString
End If
End If

End If
%>
<%
' *** Insert Record: construct a sql insert statement and execute it

Dim MM_tableValues
Dim MM_dbValues

If (CStr(Request("MM_insert")) <> "") Then

' create the sql insert statement
MM_tableValues = ""
MM_dbValues = ""
For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2
MM_formVal = MM_fields(MM_i+1)
MM_typeArray = Split(MM_columns(MM_i+1),",")
MM_delim = MM_typeArray(0)
If (MM_delim = "none") Then MM_delim = ""
MM_altVal = MM_typeArray(1)
If (MM_altVal = "none") Then MM_altVal = ""
MM_emptyVal = MM_typeArray(2)
If (MM_emptyVal = "none") Then MM_emptyVal = ""
If (MM_formVal = "") Then
MM_formVal = MM_emptyVal
Else
If (MM_altVal <> "") Then
MM_formVal = MM_altVal
ElseIf (MM_delim = "'") Then ' escape quotes
MM_formVal = "'" & Replace(MM_formVal,"'","''") & "'"
Else
MM_formVal = MM_delim + MM_formVal + MM_delim
End If
End If
If (MM_i <> LBound(MM_fields)) Then
MM_tableValues = MM_tableValues & ","
MM_dbValues = MM_dbValues & ","
End If
MM_tableValues = MM_tableValues & MM_columns(MM_i)
MM_dbValues = MM_dbValues & MM_formVal
Next
MM_editQuery = "insert into " & MM_editTable & " (" & MM_tableValues & ") values (" & MM_dbValues & ")"

If (Not MM_abortEdit) Then
' execute the insert
Set MM_editCmd = Server.CreateObject("ADODB.Command")
MM_editCmd.ActiveConnection = MM_editConnection
MM_editCmd.CommandText = MM_editQuery
MM_editCmd.Execute
MM_editCmd.ActiveConnection.Close

If (MM_editRedirectUrl <> "") Then
Response.Redirect(MM_editRedirectUrl)
End If
End If

End If
%>
<%
Dim rsin
Dim rsin_numRows
Dim Rsultimo

Set rsin = Server.CreateObject("ADODB.Recordset")
rsin.ActiveConnection = MM_galope_STRING
rsin.Source = "SELECT * FROM dbo.Investigacion"
rsin.CursorType = 0
rsin.CursorLocation = 2
rsin.LockType = 1
rsin.Open()

rsin_numRows = 0

%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>

<style type="text/css">
<!--
.Estilo1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
}
-->
</style>
</head>

<body>
<table width="200" align="center">
<tr>
<th scope="row"><img src="images/galope.gif" width="471" height="170"></th>
</tr>
<tr>
<th bgcolor="#DC2B19" scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row"><span class="Estilo1">Formulario de Investigaci&oacute;n </span></th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row"> <form method="post" action="<%=MM_editAction%>" name="form2">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Usuario:</td>
<td><input type="text" name="usuario" value="<%= Session("MM_USERNAME") %>" size="32">
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">Fecha ingreso:</td>
<td><input type="text" name="fecha_ingreso" size="32">
</td>
</tr>
<tr>
<td nowrap align="right" valign="top">Descripcion:</td>
<td valign="baseline"><textarea name="descripcion" cols="50" rows="5"></textarea>
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">&nbsp;</td>
<td><input type="submit" value="Insertar registro">

</td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form2">
</form>
<p>&nbsp;</p></th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
<tr>
<th scope="row">&nbsp;</th>
</tr>
</table>
</body>
</html>
<%
rsin.Close()
Set rsin = Nothing
%>

***********************
__________________
Gracias TOTALES :-D

Última edición por kyo1982; 31/05/2005 a las 15:41
  #4 (permalink)  
Antiguo 31/05/2005, 16:05
Avatar de trasgukabi  
Fecha de Ingreso: septiembre-2004
Mensajes: 2.749
Antigüedad: 19 años, 9 meses
Puntos: 18
en javascript, alert()
  #5 (permalink)  
Antiguo 31/05/2005, 19:02
Avatar de El_Metallick  
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 7 meses
Puntos: 16
no te respondi ya eso anteriormente???
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!
  #6 (permalink)  
Antiguo 31/05/2005, 19:07
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 22 años, 5 meses
Puntos: 98
Epa, El_Metallick ya se puso bravo tambien, este es un sindrome del forero experimentado

Salu2,
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #7 (permalink)  
Antiguo 31/05/2005, 20:14
Avatar de El_Metallick  
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 7 meses
Puntos: 16
Cita:
Iniciado por u_goldman
Epa, El_Metallick ya se puso bravo tambien, este es un sindrome del forero experimentado

Salu2,
Lo aprendi de un buen profe
creo que se llamaba u_goldman..... jajajajajaj (broma)
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!
  #8 (permalink)  
Antiguo 31/05/2005, 20:14
Avatar de u_goldman
Moderador
 
Fecha de Ingreso: enero-2002
Mensajes: 8.031
Antigüedad: 22 años, 5 meses
Puntos: 98
Ojalá te enseñaran buenas cosas!

Salú!
__________________
"El hombre que ha empezado a vivir seriamente por dentro, empieza a vivir más sencillamente por fuera."
-- Ernest Hemingway
  #9 (permalink)  
Antiguo 31/05/2005, 20:17
Avatar de El_Metallick  
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 7 meses
Puntos: 16
jajajaja bueno pero tb me han enseñado mucho pues :P pese a los retos... que aveces me merecia y bla bla bla (lease todo el sermon emotivo ya que no soy muy bueno para decir las cosas xD jajajajajaj)
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!
  #10 (permalink)  
Antiguo 01/06/2005, 07:58
Avatar de kyo1982  
Fecha de Ingreso: mayo-2005
Mensajes: 71
Antigüedad: 19 años
Puntos: 0
ya resolvi el probelma, lo hice de otra forma, de la mas facil, depues que se registra el usuario, lo redirecciono a una pagina donde cree una consulta que muestre el utlimo archivo de la base de datos que fue el que el metio.

gracias de todos modos.
__________________
Gracias TOTALES :-D
  #11 (permalink)  
Antiguo 01/06/2005, 20:47
Avatar de El_Metallick  
Fecha de Ingreso: noviembre-2002
Ubicación: Santiago, Chile
Mensajes: 1.718
Antigüedad: 21 años, 7 meses
Puntos: 16
y no era lo que yo te estaba diciendo hace algun tiempo?????
__________________
Haz la guerra en la cama y el amor donde se te de la gana...
El tiempo es el mejor maestro, lo único malo es que te mata...¡¡Aprovecha tu tiempo!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:18.