There are three ways of specifying the javascript file
http://www.symfony-project.org/book/1_2/07-Inside-the-View-Layer
Please see the section 7-26
// In the view.yml
indexSuccess:
javascripts: [myscript]
[php]
// In the Action
$this->getResponse()->addStylesheet('mystyle1');
$this->getResp
At last it works !! Thx you both a lot :)
On 14 Mar, 13:11, Sid Bachtiar wrote:
> > My layout looks like:
> >
> >
> >
> >
>
> Well, you should put jquery.js and all.js in view.yml of your app :)
>
> default:
> javascripts: [jquery, all]
>
>
>
> On Sat, Mar 14, 2009 at 11:44 PM, dziobacz
> My layout looks like:
>
>
>
>
Well, you should put jquery.js and all.js in view.yml of your app :)
default:
javascripts: [jquery, all]
On Sat, Mar 14, 2009 at 11:44 PM, dziobacz wrote:
>
> I know what is wrong but I don't know how can I fix it. In my browser
> in view page I see:
> <-
You need to specify position in your view.yml, your view section name is
registerSuccess, not only register.
registerSuccess:
javascripts: [jquery.js: {position: last}]
I am not sure, if this works only for stylesheets, but I think, it should be
the same for JS.
It is not common way of specifi
I know what is wrong but I don't know how can I fix it. In my browser
in view page I see:
<- it
should be 1 line down because I use in this file library jquery !
My layout looks like:
Why symfony add register.js before jquery.js ??
On 14 Mar, 09:27, Sid Bachtiar wrote:
> Really?
>
>
Really?
In view.yml in mymodule/config folder:
registerSuccess:
javascripts: [register]
Should add web/js/register.js to registerSuccess.php template. Did you
check using firebug check? E.g.: to see for any error, 404, 500, etc
Don't forget to clear cache and make sure that if this is Linux
also doesn't work :)
On 13 Mar, 21:57, Sid Bachtiar wrote:
> Whoops, leave out the .js, for example
>
> javascripts: [registration]
>
> (no .js)
>
>
>
> On Fri, Mar 13, 2009 at 12:07 PM, dziobacz wrote:
>
> > It is strange - Your method is logical but it doesn't work for me :/ I
> > cleared
Whoops, leave out the .js, for example
javascripts: [registration]
(no .js)
On Fri, Mar 13, 2009 at 12:07 PM, dziobacz wrote:
>
> It is strange - Your method is logical but it doesn't work for me :/ I
> cleared cache. I have also tried to do that for all module
> 'registration' in yourapp/fron
It is strange - Your method is logical but it doesn't work for me :/ I
cleared cache. I have also tried to do that for all module
'registration' in yourapp/frontend/config/view.yml:
registration:
javascripts: [registration.js]
but it also didn't work.
So I will have to use my method. :O
On 1
> In template:
>
> <- this is VERY
> IMPORTANT !!!
I think this is unconventional way to do it ... read my other reply on
how to do it in view.yml which is more conventional in Symfony
On Fri, Mar 13, 2009 at 10:26 AM, dziobacz wrote:
>
> I know !! :)
>
> In template:
>
>
You do it in view.yml of your module but specify that it is only for
registerSuccess
So in your yourapp/modules/mymodule/config/view.yml
registerSuccess:
javascripts: [registration.js]
That would include /web/js/registration.js into your registerSuccess.php
Then don't forget to clear cache!
I know !! :)
In template:
<- this is VERY
IMPORTANT !!!
On 12 Mar, 19:41, dziobacz wrote:
> I have file 'registration.js' with javascript only for page
> 'registerSuccess.php' - I added it in template registerSuccess.php:
>
>
> but it doesn't work - why ?
>
> If I add this f
12 matches
Mail list logo