Friday, April 30, 2010

Re: Cakephp Ajax is not including the javascripts in the view

Hey Andrei,

But in my case it is not like that,

Cakephp is not rendering the js file which is included in the my.ctp which is used while ajax call.

Thats why i am very panic about this issue.



On Fri, Apr 30, 2010 at 1:13 PM, Andrei Mita <andrei.mita@gmail.com> wrote:
Another guess here. I had a similar situation when developing a non-cake app.

I was using jquery to animate some tabs. JQuery was included in the head of the document, the first set of tabs where working OK. But when the user requested for some more information on the related item he was viewing, a new set of tabs was loaded via ajax but the animation wasn't working. That's because jquery had now way of knowing some new elements were inserted. The solution was to force jquery rescan my page and re-apply the effects.

Tell me if this makes any sense to you and I'll get into details.



On Fri, Apr 30, 2010 at 10:23 AM, Vijay <k.vidnyan@gmail.com> wrote:
Thanks for reply andrei.

I am calling the normal javascript functions or any javascript file.
I have some jquery effects for the text boxes & drop downs. That are
not including when the ctp get called.

my code is,

<?php
echo $html->css('mycss);

echo $html->script(array('jquery', 'another script'));?>

rest my html code............


It is including the css but no js is included.
here i am using jquery with prototype.



On Apr 30, 12:10 pm, Andrei Mita <andrei.m...@gmail.com> wrote:
> What type of js do you have in the loaded ctp?
>
> Maybe you forgot to include something in the layout.
>
> It's a blind guess without seeing the actual code. At least for me.
>
>
>
> On Fri, Apr 30, 2010 at 9:23 AM, Vijay <k.vidn...@gmail.com> wrote:
> > Hello All,
>
> > I am using the ajax for the internal links in my site.
>
> > When i click on the link & the new ctp loads, it is not including the
> > javascripts that are included in that ctp.
> > So the effects are not working.
>
> > It includes the css but not including the javascript.
>
> > Any idea.........................
>
> > Thanks,
>
> > Vijay Kumbhar,
> > CTO, Weboniselab.
> > 9766251100
>
> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others
> > with their CakePHP related questions.
>
> > You received this message because you are subscribed to the Google Groups
> > "CakePHP" group.
> > To post to this group, send email to cake-php@googlegroups.com
> > To unsubscribe from this group, send email to
> > cake-php+unsubscribe@googlegroups.com<cake-php%2Bunsubscribe@googlegroups.com>For more options, visit this group at
> Check out the new CakePHP Questions sitehttp://cakeqs.organd help others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscribe@googlegroups.com For more options, visit this group athttp://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.

You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en



--
Thanks & Regards,
Vijayk.

"You Bring the Dreams, We'll Bring the Means"

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: