Problem using the prototype function $F()
Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. How I can resolve 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 -~--~~~~--~~--~--~---
Re: Problem using the prototype function $F()
On 5/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. While this is not a CakePHP-related question, first thing you should do is make sure that Prototype is actually being loaded. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark - http://www.littlehart.net/attheballpark @TheKeyboard - http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Problem using the prototype function $F()
Maybe php is interpreting $F as a variable, so try using single quotes for the code block, like echo $javascript-codeBlock(' ... $F(sectionName) ... On May 7, 10:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. How I can resolve 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 -~--~~~~--~~--~--~---
Re: Problem using the prototype function $F()
The problem is that Cake interprets $f like a php variable. I must use \$f to resolve the problem On 7 Mag, 15:40, Chris Hartjes [EMAIL PROTECTED] wrote: On 5/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. While this is not a CakePHP-related question, first thing you should do is make sure that Prototype is actually being loaded. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark -http://www.littlehart.net/attheballpark @TheKeyboard -http://www.littlehart.net/atthekeyboard --~--~-~--~~~---~--~~ 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: Problem using the prototype function $F()
Prototype is loaded because I use other functions and these work correctly I think the problem is that Cake interprets $f like a php variable On 7 Mag, 15:40, Chris Hartjes [EMAIL PROTECTED] wrote: On 5/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. While this is not a CakePHP-related question, first thing you should do is make sure that Prototype is actually being loaded. -- Chris Hartjes My motto for 2007: Just build it, damnit! @TheBallpark -http://www.littlehart.net/attheballpark @TheKeyboard -http://www.littlehart.net/atthekeyboard- Nascondi testo tra virgolette - - Mostra testo tra virgolette - --~--~-~--~~~---~--~~ 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: Problem using the prototype function $F()
Prototype is loaded because I use other functions and these work correctly The problem is that Cake interprets $f like a php variable. I must use \$f On 7 Mag, 15:06, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. How I can resolve 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 -~--~~~~--~~--~--~---
Re: Problem using the prototype function $F()
Yes the problem is exactly that php is interpreting $F as a variable On 7 Mag, 16:06, bernardo [EMAIL PROTECTED] wrote: Maybe php is interpreting $F as a variable, so try using single quotes for the code block, like echo $javascript-codeBlock(' ... $F(sectionName) ... On May 7, 10:06 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hi I have this view: ?php echo $javascript-codeBlock( function createNewArticle(id) { var name = $F('sectionName'); alert(name); } ); ? input type=text id=sectionName size=25 When I try this view with my browser I get this error: Notice: Undefined variable: F in .. How I can resolve 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 -~--~~~~--~~--~--~---
RE: Problem using the prototype function $F()
Ok, I think *WE GOT IT* :) -MI --- Remember, smart coders answer ten questions for every question they ask. So be smart, be cool, and share your knowledge. BAKE ON! blog: http://www.MarianoIglesias.com.ar -Mensaje original- De: cake-php@googlegroups.com [mailto:[EMAIL PROTECTED] En nombre de [EMAIL PROTECTED] Enviado el: Lunes, 07 de Mayo de 2007 11:21 a.m. Para: Cake PHP Asunto: Re: Problem using the prototype function $F() Yes the problem is exactly that php is interpreting $F as a variable --~--~-~--~~~---~--~~ 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: Problem using the prototype function $F()
Yes the problem is exactly that php is interpreting $F as a variable escape the $ var name = \$F('sectionName'); -- /** * @author Larry E. Masters * @var string $userName * @param string $realName * @returns string aka PhpNut * @access public */ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---