Retroceder   Foros del Web > Programación para sitios web > Coldfusion

Respuesta
 
Herramientas Desplegado
Antiguo 11-jul-2003, 13:05   #1 (permalink)
d.roma está en el buen camino
 
Fecha de Ingreso: enero-2003
Ubicación: São Paulo
Mensajes: 337
Enviar un mensaje por Yahoo  a d.roma
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
d.roma está desconectado   Responder Citando
Antiguo 11-jul-2003, 16:06   #2 (permalink)
Thebrain está en el buen camino
 
Avatar de Thebrain
 
Fecha de Ingreso: enero-2003
Ubicación: Santiasco
Mensajes: 102
Enviar un mensaje por MSN a Thebrain
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-jul-2003 a las 16:09.
Thebrain está desconectado   Responder Citando
Antiguo 13-jul-2003, 02:42   #3 (permalink)
Cain ha deshabilitado el karma
 
Avatar de Cain
 
Fecha de Ingreso: noviembre-2002
Ubicación: Catalunya
Mensajes: 6.494
Enviar un mensaje por AIM a Cain Enviar un mensaje por Yahoo  a Cain
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).
__________________
http://malditofriki.com/
Cain está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Desactivado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 18:54.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93