Ver Mensaje Individual
  #3 (permalink)  
Antiguo 18/06/2015, 14:18
JHONATHAN11
 
Fecha de Ingreso: mayo-2015
Mensajes: 50
Antigüedad: 9 años
Puntos: 0
Respuesta: Problema con variables JS y variables TWIG

Gracias Amigo por tus ayudas me ha servido de mucho y como dijiste por medio de las peticiones ajax, puedo hacer eso..

Por si alguien tiene el mismo problema les dejo el siguiente código que me funciono ami.
Código PHP:
<script type="text/javascript">
    $(
document).ready(function() {

        $(
"#enlaceajax").click(function(evento) {
            
evento.preventDefault();
            var 
fecha prompt("Ingresar Fecha 1: Y-M-D");
            var 
fechaa prompt("Ingresar Fecha 2: Y-M-D");

            var 
url "{{path('jhonathan_sicondc_reportea',{'fecha1':'fech1','fecha2':'fech2'})}}";
            
url url.replace("fech1"fecha);
            
url url.replace("fech2"fechaa);
            
            $.
ajax({
                
method"POST",
                
urlurl,
                
dataType'html'//si esperas un html o json si esperas un json
                
data: {fecha1fechafecha2fechaa},
                
success: function(data) {
                    
console.log(data);
                    $(
'#tabla').html(data);
                     
window.open(url);
                    
alert('ok');
                },
                
error: function() {
                    
alert('mal');
                }
            });
        });
    });
</script> 

Última edición por JHONATHAN11; 19/06/2015 a las 10:26 Razón: lo solucione