14
votes
1answer
1k views

Managing common javascript dependencies in Symfony 2

I would like to know what is the standard best practice for dealing with common JavaScript (and even CSS) dependencies across several Symfony 2 bundles. According to the Book on the official Symfony ...
10
votes
3answers
8k views

How can i send json response in symfony2 controller

I am using jQuery to edit my form which is built in Symfony. I am showing the form in jQuery dialog and then submitting it. Data is entering correctly in database. But I don't know whether I need ...
7
votes
3answers
7k views

Generating routes in javascript with Twig and Symfony2

Quite odd problem, sorry for asking, i'm quite new to Symfony/Twig. My route requires a mandatory region_id paramenter: ajax_provinces_by_region: pattern: /ajax/region/{region_id}/provinces ...
7
votes
2answers
2k views

how to use Backbone.js with the Symfony framework and or Apache Thrift

I recently installed a web app which use Symfony2 framework and Apache Thrift. Now I would like to make backbone usable in Symfony2 framework. My question is about Backbone.sync. How can I ...
6
votes
2answers
797 views

symfony 2 equivalent for url_for() function in symfony 1

In Symfony 1 we can access an action in template page as for example url_for('modulename/actionname') without writing anything in routing.yml. how is this possible in Symfony2?,that is if i have to ...
5
votes
4answers
291 views

Browser aborting ajax requests sporadically without return any errors [duplicate]

In my project (PHP w/ symfony2) I do a lot of ajax requests in every page. I'm having a lot of problems with them because it looks like browsers (tested in Chrome and Firefox) are aborting requests ...
5
votes
4answers
957 views

Symfony2 multiple forms in different JQuery UI tabs but single page

I'm facing a problem that I can summarize as it follows: I have a TWIG template page like this (reg.html.twig): {% extends "::base.html.twig" %} {% block body %} <ul class="tabs"> <li ...
5
votes
1answer
969 views

Sharing Symfony2 validation rules with backbone.js or javascript in general?

Whould be possible to expose Symfony2 validation rules (for a given Entity)? I can't find nothing like this. I'm trying to do client-side validation (using backbone.js) with a DRY approach. Something ...
4
votes
2answers
5k views

Using javascript in Symfony2/Twig

I have a view called contact.html.twig. It has a form with some textfields. I want to use javascript to validate that none of the fields are empty, as well as some other rules. But I do not know where ...
4
votes
2answers
7k views

Using Twig for dynamic Javascript files

I'm working on a kind of dashboard mini site that has blocks with a certain functionality. Using symfony2 I have a dedicated route /instagram that gets an html fragment that shows all the images taken ...
4
votes
3answers
842 views

How to send javascripts to the bottom? (in symfony 2)

I want to create views that can by themselves print some html code, and at the same time, send javascript code to the bottom, without extending the layout The idea is that I have a layout, then the ...
3
votes
1answer
611 views

Symfony 2 - Assetic Javascript compression causing errors

I'm trying to put a Symfony 2 app in production mode. It all runs fine except for the fact that the compressed single javascript file causes errors and makes the site unable to render correctly. I ...
3
votes
1answer
3k views

Symfony2 and jquery ajax

I am developing an application using Symfony2 and Jquery as a JavaScript FW. I am using Twig for the templates. I render a template from the controller and after making a selection using the cursor in ...
3
votes
1answer
65 views

KnockoutJS - Sending a form containing the value of a javascript object results in a timeout

I have a problem that occurs when I try to send a form, if a particular field type is present, the page returns a time out. I'm using KnockoutJS's mapping plugin to map an object coming from the ...
3
votes
3answers
2k views

Symfony2 Ajax and Jquery

I am developing an application using Symfony2 and twig for the templates. I am also using ajax. This is part of my code in my controller: public function testuaanotatuAction(Request $request) ...

1 2 3 4 5 9
15 30 50 per page