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

Haber chavos ya logre obtener el valor del input...
Ahora necesito pasarlo a una variable php en ese mismo archivo, para eso hice otro script pero no esta funcionando ya que nisiquiera sale el alert que le puse (el del segundo script), dejo aqui mi codigo. Ojala puedan darle una revisada...Gracias

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 = $(this).val();
    alert(fecha);
    var URL='../fecha/fecha.php?fecha='+fecha;
   	}
   });
   })
   </script>
   <script>
   
   $('#post').live('click', function(){
   	$.ajax({    
   		type: 'POST',   
   		data: 'fecha='+$(this).val(),    
   		url: '../fecha/fecha.php',            
   		success: function(data){      
   			alert( "La fecha que eligio: : " + data );     
   		}});
   
  </script>
  
</head>

<body>

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

<?PHP
$fecha=$_POST['fecha'];
echo "<script> alert ('fecha='+$fecha)</script>";
?>


</body>
</html>