Problem using the prototype function $F()

2007-05-07 Thread [EMAIL PROTECTED]
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

Re: Problem using the prototype function $F()

2007-05-07 Thread Chris Hartjes
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

Re: Problem using the prototype function $F()

2007-05-07 Thread bernardo
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

Re: Problem using the prototype function $F()

2007-05-07 Thread [EMAIL PROTECTED]
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

Re: Problem using the prototype function $F()

2007-05-07 Thread [EMAIL PROTECTED]
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

Re: Problem using the prototype function $F()

2007-05-07 Thread [EMAIL PROTECTED]
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

Re: Problem using the prototype function $F()

2007-05-07 Thread [EMAIL PROTECTED]
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,

RE: Problem using the prototype function $F()

2007-05-07 Thread Mariano Iglesias
-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

Re: Problem using the prototype function $F()

2007-05-07 Thread Larry E. Masters aka PhpNut
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 */