Foros del Web » Programación para mayores de 30 ;) » Programación General »

cfset: entrar con datos?

Estas en el tema de cfset: entrar con datos? en el foro de Programación General en Foros del Web. yo queria entrar con datos directamente a través de un <imput type=text>, y no por la variable en cfset: <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" ...
  #1 (permalink)  
Antiguo 11/07/2003, 13:05
 
Fecha de Ingreso: enero-2003
Ubicación: São Paulo
Mensajes: 337
Antigüedad: 21 años, 3 meses
Puntos: 0
Pregunta cfset: entrar con datos?

yo queria entrar con datos directamente a través de un <imput type=text>, y no por la variable en cfset:

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<cfset Price="20">

<form name="frmestruturas_condiconais" method="post" action="condicao_testada.cfm">


<p align="center"><b><i><font size="+4" face="Comic Sans MS">Condi&ccedil;&atilde;o
if then</font></i></b></p>
<p>
<input type="hidden" name="Price" value="#Price#">
<input type="text" name="text_maior_10">
<input type="submit" name="cmdTesta" value="Testar N&uacute;meros &gt;10">
</p>
<cfoutput>
<!---Condição para teste de números maiores que 10--->
<cfif Price greater than or equal to 10>

<h3>The Price is greater than #Price#</h3>
<cfelse>
<h3>The Price is less than #Price#</h3>

</cfif>
</form>
</cfoutput>
</body>
</html>

tengo como hacerlo en cold fusion, para el usuario hacer la comparacion con sus numeros?
muchas gracias
  #2 (permalink)  
Antiguo 11/07/2003, 16:06
Avatar de Thebrain  
Fecha de Ingreso: enero-2003
Ubicación: Santiasco
Mensajes: 100
Antigüedad: 21 años, 3 meses
Puntos: 0
a ver si entiendo

tu quieres saber si el numero que ingresa una persona es mayor o menor a 20?? y esto a travez de un form...

eso es lo que entiendo y habria que arreglar unas cosillas en el codigo
Código:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">

<cfset Price1="10">

<form name="frmestruturas_condiconais" method="post" action="condicao_testada.cfm">
<p align="center"><b><i><font size="+4" face="Comic Sans MS">Condição if then</font></i></b></p>
<p>
<input type="hidden" name="Price" value="#Price1#">
<input type="text" name="Price2">
<input type="submit" name="cmdTesta" value="Testar Números &gt;10">
</p>
<cfoutput> 
<!---Condição para teste de números maiores que 10--->
<cfif #form.Price2# greater than or equal to 10>

<h3>The Price is greater than #Price#</h3>
<cfelse>
<h3>The Price is less than #Price#</h3>

</cfif>
</form>
</cfoutput>
</body>
</html>
ahora me acabo de dar cuenta que tu pregunta es como hacerlo para no utilizar el cfset
Código:
<input type="hidden" name="Price" value="#Price1#">
eso cambialo a
Código:
<input type="hidden" name="Price" value="20">
__________________
I'm sick of all you hypocrites holding me at bay And I don't need your sympathy to get me through the day.Dream Theater - A Change of Seasons

http://www.dreamtheater.cl

Última edición por Thebrain; 11/07/2003 a las 16:09
  #3 (permalink)  
Antiguo 13/07/2003, 02:42
Avatar de Cain  
Fecha de Ingreso: enero-2002
Ubicación: Catalunya
Mensajes: 6.459
Antigüedad: 22 años, 3 meses
Puntos: 17
Ten en cuenta que:

- ColdFusion trabaja en el servidor.
- Javascript trabaja en el cliente.

Para que ColdFusion trabaje, debes hacer una petición al servidor (cargar una página).
__________________
M a l d i t o F r i k i
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 23:10.