views:

325

answers:

3

I'm reading a tutorial for 1.2,which says prototype is the built in library :

http://www.symfony-project.org/book/1_2/11-Ajax-Integration

What about the newest version of symfony?

I'm only familiar with jQuery,is there an easy way to replace the default by jQuery?

A: 

As far as i know, it is still prototype. If you can download it, you can easily check this too. Also see what's new in 1.4, there is no mention of new js library being included.

Sarfraz
I've downloaded symfony1.4,but don't see it there
@user198: i am not sure but it should be somewhere there, you should see it in some folder like js/javascript or something.
Sarfraz
+3  A: 

I don't believe there is a default in 1.4, no JS library is bundled with the release. To get jQuery method bindings like you had in 1.2 you can use the sfJqueryReloadedPlugin.

Cryo
@Cryo is correct, there is no bundled JS library with 1.4. You need to add one manually.
Stephen Melrose
+1 for Cryo - give him an accepted answer, user198729 :)
Raise
he got his answer and left cryo crying:/
never_had_a_name
A: 

As far as I know, that built-in support is removed in 1.4 and in any case plugins and stuff aren't up to date for that. You're better off just ignoring it and building what you need yourself.

I'm using Symfony 1.4 very happily with Jquery 1.4. You set the Javascript source you need in the view.yml configuration file of the application or module (using the standard Symfony configuration cascade). And I think you can use a Javascript helper to call a .js file on the fly as well.

It all works fine.

Tom