I have a problem with the code:
$cadenaScroll_respuesta.="<li> <div id='usuario-respond'><div id='imagen-usuario-respond' ><ul> <li id='nombreUsuario'> <b>".$respuesta->getUsuario()." </b></li><li id='avatar'> <img src = {{ asset('bundles/UsuarioBundle/Uploads/' ~ ".$respuesta->getFoto()." ~' ) }}' width='100%' height='100%'/> </li> <li id='opciones'><b> opciones </b> </li> </ul></div>".$respuesta->getTexto()."</div></li>";
}
The previous string is returned with a response from the controller, and basically I need it to make the append of the li to an ul (they are forum topics that are updated by scrolling on Ajax request).
in my jquery success function
success: function(data) {
alert(data);
$('#loading').hide();
//window.scrollTo(50, 0);
$('#detalle ul').append(data);
},
in the browser does not recognize the dir of Asset (when I give inspect element appears to me)
<img src="{{" asset('bundles="" usuariobundle="" uploads="" '="" ~="" 1.jpg="" ~'="" )="" }}'="" width="100%" height="100%">
with which I sense that you do not recognize the symbols / and puts me quotes again