Thanks Sherlock for the response. If i understand right, then the problem would be the line that i use to include the prototype js file? Following the tutorial I placed the prototype file in the app/webroot/ js/ folder. and I include this line in the app/views/layout/ default.ctp file:
<head> <title> My Cake Blog Application </title> <?=$html->css('cake.generic'); ?> <?=$javascript->link(array('cake.prototype')); ?> </head> Thanks, -Armen On Jul 11, 5:26 pm, Sam Sherlock <sam.sherl...@gmail.com> wrote: > Hi Armen, > firstly I don;t use the protoype help but go with jquery also I have not > read the book you cite. That being said I think I have found you issue or a > clue in tracking the cause of problem > > I have just tried putting a message I get some errors > > 1. syntax error > 2. Event.observe is not a function > > using firebug. WHen I look closer the js being source by page > is /warplayart/page/blog/js/prototype.js its returning html not > jshttp://warplayart.com/warplayart/js/prototype.jsis also not there - this > looks more like the url you want to me > > you could try loading this from google hosted > apihttp://ajax.googleapis.com/ajax/libs/prototype/1.6.0.3/prototype.js > > also if the ajax response is including the debug output this could cause you > issues - its worth try with debug turned off also. > > hth - S > > 2009/7/11 armen <oldar...@gmail.com> > > > > > Hi again, > > sorry forgot to mention, I already fixed the typos before checking out > > the book website, which included echoing the JavaScript link. > > Well the problem is when i add the ajax form it displays it with no > > problem. However, when i click the 'add submit' button, It wont update > > the database. I manually added a comment in the SQL database, so the > > view action and the view.ctp loop works fine. I'm assuming the problem > > is with the ajax form adding lines which include <?= ajax->form('/ > > comments/add', 'post', array('Update'=>'comments'));?> . > > If you''d like to see the result here is the link. try to add a > > comment, it wont function. > > >http://warplayart.com/warplayart/page/blog/posts/view/1 > > I beg you not to hack my server. > > > -Thank you > > Armen > > > On Jul 11, 8:55 am, Jon Chin <j...@boogly.net> wrote: > > > I've read it too and had the same experience. There's typos and errors > > > here and there but your intuition usually tells you what's better. You > > > might want to check out the errata on the Packt website for that book. > > > He published a bunch of corrections. > > > > I have AJAX functionality working on my site and I only really followed > > > the instructions in that book (possibly with some help from > > > book.cakephp.org too). Maybe if you give us some details on what you're > > > experiencing, armen, we can help you figure out what's wrong. > > > > Jon Chin > > > > Matthew Bingham wrote: > > > > I have (and a couple of others) but I haven't gotten to that chapter > > > > yet. Got a page number for me? > > > > > (I have 4 cake books and have found errors in 2 so far -- I've read 3. > > > > Both the ones I have published by PAKT are riddled with insignificant > > > > little errors. Things anyone would see and say 'nah I'm gonna do > > > > this...') > > > > > On Sat, Jul 11, 2009 at 6:50 AM, womble<l.e.ad...@gmail.com> wrote: > > > > >> Haven't read said book. But have recently used the prototype library > > > >> for Ajax in Cake. > > > > >> Perhaps post what you are after, and what problems you are getting. > > > > >> On Jul 11, 7:15 pm, armen <oldar...@gmail.com> wrote: > > > > >>> Hi all, > > > >>> I'm reading this book > > > >>> "Beginning CakePHP from Novice to Professional " which is tutorial > > > >>> based and it's easier to learn since it includes alot of examples. I > > > >>> reached the Ajax integration chapter and i'm having problems setting > > > >>> up prototype to work with my pages. has anyone encountered this error > > > >>> in the book? > > > > >>> Thanks in advance, > > > >>> -Armen > > > > smime.p7s > > > 4KViewDownload --~--~---------~--~----~------------~-------~--~----~ 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---