Tema: input jquery
Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/09/2010, 08:09
Avatar de catpaw
catpaw
 
Fecha de Ingreso: mayo-2010
Ubicación: xalapa
Mensajes: 856
Antigüedad: 14 años
Puntos: 23
input jquery

Hola forer@s.

Aqui solicitanto su valiosa ayuda con esto que trato hacer, les comento, quiero tomar el valor de un input text a traves de jquery, les aviso que no se mucho por no decir nada de jquery, anduve investigando y estructure un codigo pero no me funciona del todo, aca el codigo de mi archivo fecha.php:

Código HTML:
<html>
<head>
  <link href="../fecha/js/jquery-ui-1.8.5.custom.css" rel="stylesheet" type="text/css"/>
  <script src="../fecha/js/jquery-1.4.2.min.js"></script>
  <script src="../fecha/js/jquery-ui-1.8.5.custom.min.js"></script>
  <script>
  $(document).ready(function(){
   $("#datepicker").datepicker({
   showOn: 'both',
   buttonImage: 'calendar.png',
   buttonImageOnly: true,
   changeYear: true,
   numberOfMonths: 1,
   onSelect: function(fecha_cumple, objDatepicker){
   var fecha = $('#datepciker').val();
   alert(fecha);
   var URL='../fecha/fecha.php?fecha='+fecha;
   }
   });
   })
  </script>
</head>

<body>

<form  action="fecha.php" method="post">
	FECHA: <input type="text" id="datepicker" name="fecha" />
</form>

<?PHP
$fecha=$_POST['fecha'];
echo $fecha;
?>

</body>
</html> 
veran, genero un calendario con jquery, que se llama al presionar la imagen, entonces selecciono la fecha y esta se introduce al input, como pueden ver en el codigo pongo un alert con la variable de mi input pero cuando lo corro me sale undefined, no esta tomando el valor del input...

Gracias por su ayuda...