Hey there, I am having exactly the same problem as you. By the looks of it, I need some kind of layout controller to load the javascript helper. Could you perhaps point me to the "pages.ctb" file? I can't seem to find it.. thanks!
On Feb 6, 4:40 pm, Ithaka <[EMAIL PROTECTED]> wrote: > Found another way to fix it. > > There is acontrollercalled pages.ctb, in this file i added > javascript as a helper. > > Then i did $javascript->link(); and it worked. And im guessing to > make sure that js still works, when i enter in other pages that i > should start javascript aswell. > > I leave this final comment for people that are having a hard time > starting with cake, hopefully this helps people. > > On Feb 6, 9:31 am, Ithaka <[EMAIL PROTECTED]> wrote: > > > Fixed it! > > > I just added it as normal html coding and it worked, i must have > > something wrong in cakephp codes somewhere, i will investigate > > further, but thanks everyone! > > > On Feb 6, 9:19 am, Ithaka <[EMAIL PROTECTED]> wrote: > > > > It still isn't working. > > > > I put the javascript into app/webroot/js/ > > > I put the javascript in project directory/webroot/js > > > I put the images in app/webroot/img > > > I put the images in project directory/webroot/img > > > > And on thelayouti have the html that finds the images but the > > > javascript doesn't seem to. > > > > P.s. i made a typo with the <script> tags on my last post, it was > > > actually src. > > > > On Feb 5, 5:25 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > > > > > It should be pointing to /js/images.js , mod_rewrite will take care of > > > > the rest. Put your javascript in app/webroot/js/ . > > > > > And > > > > > <script type="text/javascript" > > > > rel="project directory/js/images.js"></script> > > > > > should be: > > > > > <script type="text/javascript" > > > > src="project_directory/js/images.js"></script> > > > > > On Feb 5, 2008 6:57 PM, Ithaka <[EMAIL PROTECTED]> wrote: > > > > > > Hi dardo, > > > > > > Yes, i did as juan instructed i did $helpers with javascript and all > > > > > those required in thecontroller. And i checked in the source code > > > > > and i found this quite odd. <script type="text/javascript" > > > > > rel="project directory/js/images.js"></script>, i made it so that it > > > > > would generate in the head section. But can u tell me why it's > > > > > pointing to projectdirectory/js/images.js?? i thought cake had enough > > > > > js folders already. After I discovered this, I copied a js folder to > > > > > match that directory yet it still does not work. I'll keep trying > > > > > stuff but this is getting strange. > > > > > > On Feb 5, 3:29 pm, "Dardo Sordi Bogado" <[EMAIL PROTECTED]> wrote: > > > > > > Juan (in his first post) is suggesting that you put in > > > > > > thecontroller: > > > > > > > var $helpers = array('Html', 'Form', 'Javascript'); > > > > > > > Also check the html rendered to the browser ('view source' in your > > > > > > browser) for the presence of your javascript, and check that it is > > > > > > accessible via the linked url. > > > > > > > On Feb 5, 2008 6:09 PM, Ithaka <[EMAIL PROTECTED]> wrote: > > > > > > > > Quick update: Juan, i understand where u are coming from with > > > > > > > your > > > > > > > message. The reason why i said i don't have anything on my app is > > > > > > > because i'm just doing thelayoutright now and i'm trying to load > > > > > > > javascript onto thelayout. So i a quick app close to teh blog > > > > > > > tutorial to test something and i load the javascript helper into > > > > > > > the > > > > > > >controller. I almost have the solution...the java loads, i > > > > > > >believe, > > > > > > > but it still doesn't do anything. And if your wondering, the > > > > > > > java for > > > > > > > thelayoutis for my graphic buttons that are in the "header" part > > > > > > > of > > > > > > > thelayout. > > > > > > > > On Feb 5, 2:36 pm, Ithaka <[EMAIL PROTECTED]> wrote: > > > > > > > > I've already done that.... so i'm missing something here. > > > > > > > > > On Feb 5, 3:23 pm, "Juan F. Gimenez Silva" <[EMAIL PROTECTED]> > > > > > > > > wrote: > > > > > > > > > > El mar, 05-02-2008 a las 11:12 -0800, Ithaka escribió: > > > > > > > > > > > No... i don't have any anything on my site yet except a > > > > > > > > > > default > > > > > > > > > >layout, how would i make acontrollerfor thelayout? > > > > > > > > > > I suggest you start reading the manual > > > > > > > > > (http://manual.cakephp.org/), and > > > > > > > > > try to complete the tutorial > > > > > > > > > (http://manual.cakephp.org/appendix/blog_tutorial) to get > > > > > > > > > used with the > > > > > > > > > framework.- Hide quoted text - > > > > > > > > > - Show quoted text -- Hide quoted text - > > > > > > > - Show quoted text -- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---