Is it possible to get object from twig array knowing that the index is a javascript variable   Mycontroller  public function showContactModalAction($iduser, $profil) {     $em = $this->getDoctrine()->getEntityManager();     $contacts = $em->...
I would like to know how to pass javascript variables values from twig to controller using href path in Symfony2. this is my code:   <html> <head>     <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <...
i have a problem in my twig view when i pass params in the ajax url path, logically twig is executed before javascript so he didnt recognize the input value passed as parameter. Is there a solution to do this without passing the param in data ?    &l...
I want to test if and id of an <li> is equal to a contact id or not, my jquery code is given as follow:  var points = new Array(); var i = 0;  $(this).toggleClass('selected'); $('#result').html($('#firstList .selected')....
In Twig is it possible to ascertain the international date format, to perform the following in JavaScript:  var frmt; {% if usformat %}     frmt = "MM/DD"; {% else %}     frmt = "DD/MM"; {% endif %} document.getElementById("dt_tm&...
Sorry for posting this again, but I can't find anything useful on the internet. I'm trying to create a calendar. I'm using symfony 3 and fullcalendar to create it. So in my twig class I've created a variable:  {% set fff = ""...
It's not about libraries, it's about custom scripts.  I know two solutions:   To write everything in one big file (many functions or custom library) To write pieces of scripts in twig templates    Both solutions do not really like. In the fir...
I am trying to build a simple contacts app using Backbone js to learn backbone.I am using symphony to serve the page.But i am not able to include the app.js file in my twig template.Here are my files :  index.html.twig  {% extends 'base.html.twig...
Morning, here is what happens.  I made a dev, it was working fine, but only with firefox. When i tested it with chrome...it wasn't working at all.  So, I have a select and I want to save the selected value to deal with it later.  Here is my angul...
I'm trying to use the document.write javascript function to set an external css file in my template, but, I want to do this via Twig just like this:  document.write('<link href="{{ asset('bundles/activos/css/app-orange.css') }}...

Tags

Recent Questions

Top Questions

Home Tags Terms of Service Privacy Policy DMCA Contact Us

©2020 All rights reserved.