Foros del Web » Programando para Internet » Javascript » Frameworks JS »

que = $_POST["unitats"]; NO FUNCIONA

Estas en el tema de que = $_POST["unitats"]; NO FUNCIONA en el foro de Frameworks JS en Foros del Web. Tengo este pequeño codigo y no entiendo porque no me funciona: <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> <SCRIPT> function afegiringredient() { que = $_POST["unitats"]; alert(que); } </SCRIPT> <div class='ingredients'>2 ...
  #1 (permalink)  
Antiguo 04/09/2010, 08:02
CdT
 
Fecha de Ingreso: septiembre-2007
Mensajes: 3
Antigüedad: 16 años, 7 meses
Puntos: 0
que = $_POST["unitats"]; NO FUNCIONA

Tengo este pequeño codigo y no entiendo porque no me funciona:

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<SCRIPT>
function afegiringredient()
{
que = $_POST["unitats"];
alert(que);
}
</SCRIPT>
<div class='ingredients'>2 gr de pa</div>
<form name='recepta' method='post' action='intrrecepta.php'>
<input type='text' name='unitats' size='4'><A href='javascript:afegiringredient()'><IMG src='imatges/afegir.jpeg' border='0'></A>
</form>

Alguien me puede hechar un cable?
Gracias.
  #2 (permalink)  
Antiguo 04/09/2010, 08:46
 
Fecha de Ingreso: enero-2009
Ubicación: Neiva, Huila
Mensajes: 196
Antigüedad: 15 años, 3 meses
Puntos: 2
Respuesta: que = $_POST["unitats"]; NO FUNCIONA

<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
<SCRIPT>
function afegiringredient(f)
{
que = f.unitats.value;
alert(que);
}
</SCRIPT>
<div class='ingredients'>2 gr de pa</div>
<form name='recepta' method='post' action='intrrecepta.php'>
<input type='text' name='unitats' size='4'><A href='javascript:afegiringredient(recepta)'>sdfdsf sd</A>
</form>

Etiquetas: ajax
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 04:18.