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

Formulario que se muestra según fecha

Estas en el tema de Formulario que se muestra según fecha en el foro de ASP Clásico en Foros del Web. Buenos dias, queira sabes como hacer para que un formulario se muestre si la fecha del dia es igual o inferior a la preestablecida. Un ...
  #1 (permalink)  
Antiguo 18/12/2004, 07:04
Avatar de Prefontaine  
Fecha de Ingreso: agosto-2004
Mensajes: 313
Antigüedad: 20 años, 8 meses
Puntos: 0
Formulario que se muestra según fecha

Buenos dias, queira sabes como hacer para que un formulario se muestre si la fecha del dia es igual o inferior a la preestablecida.

Un saludo
  #2 (permalink)  
Antiguo 18/12/2004, 07:22
Avatar de PMP
PMP
 
Fecha de Ingreso: febrero-2003
Ubicación: Chacabuco - Buenos Aires
Mensajes: 214
Antigüedad: 22 años, 2 meses
Puntos: 1
Prueba con esto

Código PHP:
Dim Fecha_Preestablecida
Dim Fecha_Actual
Dim dias

Fecha_Preestablecida 
'Acá va la fecha preestablecida'

Fecha_Actual Now()

dias DateDiff("d"Fecha_PreestablecidaFecha_Actual)

If 
dias >= 0 then
'Mostrar Formulario'
end if 
  #3 (permalink)  
Antiguo 18/12/2004, 07:46
Avatar de Prefontaine  
Fecha de Ingreso: agosto-2004
Mensajes: 313
Antigüedad: 20 años, 8 meses
Puntos: 0
Donde debo colocarlo... en la cabecera, no?
aunque es codigo php se puede adaptar a asp? cierto?

Un saludi
  #4 (permalink)  
Antiguo 18/12/2004, 08:02
Avatar de PMP
PMP
 
Fecha de Ingreso: febrero-2003
Ubicación: Chacabuco - Buenos Aires
Mensajes: 214
Antigüedad: 22 años, 2 meses
Puntos: 1
Es código ASP, y puedes hacerlo de la siguiente manera

Código PHP:
<%
Dim Fecha_Preestablecida 
Dim Fecha_Actual 
Dim dias 

Fecha_Preestablecida 
'Acá va la fecha preestablecida' 

Fecha_Actual Now() 

dias DateDiff("d"Fecha_PreestablecidaFecha_Actual

If 
dias >= 0 then 
%>
     <
form>.....</form>
<%
end if 
%> 
  #5 (permalink)  
Antiguo 18/12/2004, 08:21
Avatar de Prefontaine  
Fecha de Ingreso: agosto-2004
Mensajes: 313
Antigüedad: 20 años, 8 meses
Puntos: 0
Muy bien me a servido, pero como podría colocorle un response redirect?

Un saludo
  #6 (permalink)  
Antiguo 18/12/2004, 08:23
Avatar de Prefontaine  
Fecha de Ingreso: agosto-2004
Mensajes: 313
Antigüedad: 20 años, 8 meses
Puntos: 0
se lo he colocado debajo pero no funciona...
  #7 (permalink)  
Antiguo 20/12/2004, 04:57
Avatar de PMP
PMP
 
Fecha de Ingreso: febrero-2003
Ubicación: Chacabuco - Buenos Aires
Mensajes: 214
Antigüedad: 22 años, 2 meses
Puntos: 1
Puedes mandar el código ó es muy grande?
  #8 (permalink)  
Antiguo 20/12/2004, 06:37
Avatar de Prefontaine  
Fecha de Ingreso: agosto-2004
Mensajes: 313
Antigüedad: 20 años, 8 meses
Puntos: 0
Pués no es exceseivamente largo, es este:

<td width="549" height="40" class="titulo2">



Crear Equipo</td>
</tr>
<tr align="center">
<td width="549" height="121">



<form name="Form1" method="post" action="agregar_equipo.asp" onsubmit="return verifica(this.form)">
<div align="center">
<center>
<table border="0" width="311" height="158" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
<tr>
<td width="108" height="24">Nombre Equipo:&nbsp;</td>
<td width="187" height="24">
<input type="text" name="Nombre" maxlength="20" style="border:1px inset #C0D0F0; background-color: #C0D0F0; color: #489A3D; font-family: Verdana; font-size: 8pt; font-weight: bold; "type=text name=src maxlength=200 class=edit onFocus="enfoca(this);" onBlur="desenfoca(this);" size="23">
</td>
</tr>
<tr>
<td width="108" height="17">Breve Descripción</td>
<td width="187" height="17">
<input type="text" name="Descripcion" maxlength="25" style="border:1px inset #C0D0F0; background-color: #C0D0F0; color: #489A3D; font-family: Verdana; font-size: 8pt; font-weight: bold; "type=text name=src maxlength=200 class=edit onFocus="enfoca(this);" onBlur="desenfoca(this);" size="23"></td>
</tr>
<tr>
<td width="108" height="23">E-mail de contacto</td>
<td width="187" height="23">
<input type="text" name="contacto" maxlength="200" style="border:1px inset #C0D0F0; background-color: #C0D0F0; color: #489A3D; font-family: Verdana; font-size: 8pt; font-weight: bold; "type=text maxlength=200 class=edit onFocus="enfoca(this);" onBlur="desenfoca(this);" size="23"></td>
</tr>
<tr>
<td width="108" height="13"></td>
<td width="187" height="13">
</td>
</tr>
<tr>
<td width="108" height="43"></td>
<td width="187" height="43">
<input type="submit" name="Submit" value="Envíar" class="boton">
</td>
</tr>
<tr>
  #9 (permalink)  
Antiguo 20/12/2004, 07:26
Avatar de PMP
PMP
 
Fecha de Ingreso: febrero-2003
Ubicación: Chacabuco - Buenos Aires
Mensajes: 214
Antigüedad: 22 años, 2 meses
Puntos: 1
Código PHP:
<% 
Dim Fecha_Preestablecida 
Dim Fecha_Actual 
Dim dias 

Fecha_Preestablecida 
'Acá va la fecha preestablecida' 

Fecha_Actual Now() 

dias DateDiff("d"Fecha_PreestablecidaFecha_Actual

If 
dias >= 0 then 
%> 
<
form name="Form1" method="post" action="agregar_equipo.asp" onsubmit="return verifica(this.form)">
<
table><tr><td width="549" height="40" class="titulo2" colspan="2">Crear Equipo</td></tr
<
tr
<
td width="108" height="24">Nombre Equipo:&nbsp;</td>
<
td width="187" height="24">
<
input type="text" name="Nombre" maxlength="20" class=edit onFocus="enfoca(this);" onBlur="desenfoca(this);" size="23"
</
td>
</
tr>
<
tr>
<
td width="108" height="17">Breve Descripción</td>
<
td width="187" height="17">
<
input type="text" name="Descripcion" maxlength="25" class=edit onFocus="enfoca(this);" onBlur="desenfoca(this);" size="23"></td>
</
tr>
<
tr>
<
td width="108" height="23">E-mail de contacto</td>
<
td width="187" height="23">
<
input type="text" name="contacto" maxlength="200" class=edit onFocus="enfoca(this);" onBlur="desenfoca(this);" size="23"></td>
</
tr>
<
tr>
<
td width="108" height="13"></td>
<
td width="187" height="13">
</
td>
</
tr>
<
tr>
<
td width="108" height="43"></td>
<
td width="187" height="43"><input type="submit" name="Submit" value="Envíar" class="boton"></td>
</
tr>
</
table>
<% 
end if 
%> 
  #10 (permalink)  
Antiguo 20/12/2004, 10:50
Avatar de Prefontaine  
Fecha de Ingreso: agosto-2004
Mensajes: 313
Antigüedad: 20 años, 8 meses
Puntos: 0
Como lo configuro, a mí no me hace nada.
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 08:08.