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
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
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
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
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
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
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,
-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
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
*/