Re: Inline javascript in a view not executed
My code is this: Index.thtml: link('New','#', array( 'update'=>'div_id', 'url'=>'/post/new/' ) ,null,false); ?> New.thtml: link('myJS') ?> codeBlock(' myJSfunction(); ') ?> If I execute post/new all works fine. If I execute post/index it doesn't work. On 5 Dic, 09:13, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Yes I'm using prototype. > I'm using Ajax helper. > I'm using $ajax->link and from Html code I can see that evalScript is > already set to true. > > On 4 Dic, 19:11, Christophe Cholot <[EMAIL PROTECTED]> wrote: > > > On Dec 4, 5:22 pm, "[EMAIL PROTECTED]" > > > <[EMAIL PROTECTED]> wrote: > > > Hi I have a question > > > I have a index.thml where there are many divs. > > > Then with ajax I substitute one of divs with anotherview > > > (view.thtml). > > > In thisviewI use ajavascriptfunction attached to a link. > > > So If I define this function inview.thtml I get an error instead I > > > define the function in index.html all works fine. > > > But I would define the function inview.thtml because I use this > > > function only in thisview. > > > How I can do This ? > > > Many Thanks > > > Marco > > > Hello, > > > WhatJavascriptlibrary are you using ? > > > With prototype, if think you can set evalScripts to true as an option > > when using Ajax.Request. You can also play with onSuccess callback to > > get things done. > > > I hope it helps ! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Inline javascript in a view not executed
Yes I'm using prototype. I'm using Ajax helper. I'm using $ajax->link and from Html code I can see that evalScript is already set to true. On 4 Dic, 19:11, Christophe Cholot <[EMAIL PROTECTED]> wrote: > On Dec 4, 5:22 pm, "[EMAIL PROTECTED]" > > <[EMAIL PROTECTED]> wrote: > > Hi I have a question > > I have a index.thml where there are many divs. > > Then with ajax I substitute one of divs with another view > > ( view.thtml). > > In this view I use a javascript function attached to a link. > > So If I define this function in view.thtml I get an error instead I > > define the function in index.html all works fine. > > But I would define the function in view.thtml because I use this > > function only in this view. > > How I can do This ? > > Many Thanks > > Marco > > Hello, > > What Javascript library are you using ? > > With prototype, if think you can set evalScripts to true as an option > when using Ajax.Request. You can also play with onSuccess callback to > get things done. > > I hope it helps ! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: Inline javascript in a view not executed
On Dec 4, 5:22 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi I have a question > I have a index.thml where there are many divs. > Then with ajax I substitute one of divs with another view > ( view.thtml). > In this view I use a javascript function attached to a link. > So If I define this function in view.thtml I get an error instead I > define the function in index.html all works fine. > But I would define the function in view.thtml because I use this > function only in this view. > How I can do This ? > Many Thanks > Marco Hello, What Javascript library are you using ? With prototype, if think you can set evalScripts to true as an option when using Ajax.Request. You can also play with onSuccess callback to get things done. I hope it helps ! --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Inline javascript in a view not executed
Hi I have a question I have a index.thml where there are many divs. Then with ajax I substitute one of divs with another view ( view.thtml). In this view I use a javascript function attached to a link. So If I define this function in view.thtml I get an error instead I define the function in index.html all works fine. But I would define the function in view.thtml because I use this function only in this view. How I can do This ? Many Thanks Marco --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---