You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Fabio Sabatini <f....@cbim.it> on 2003/02/11 19:49:57 UTC
[flow] How can I "delete" in javascript?
I'm using C2.1 with *flow*.
I have to call the method *delete* of a class, in a javascript function
of my controller layer.
Maybe delete is a keyword in javascript and when the function is called
I get this error:
SyntaxError: missing name after . operator
The code is:
myClass.delete(objectToDelete);
The same error using the function eval:
eval("myClass.delete(objectToDelete)");
Thanks.
Fabio
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
RE: [flow] How can I "delete" in javascript?
Posted by Luca Morandini <lu...@tin.it>.
yes, "delete" is a reserved keyword in Javascript: it cannot be used as function name, variable name, loop label.
Regards,
---------------------------------------------
Luca Morandini
GIS Consultant
lmorandini@ieee.org
http://utenti.tripod.it/lmorandini/index.html
---------------------------------------------
> -----Original Message-----
> From: Fabio Sabatini [mailto:f.sabatini@cbim.it]
> Sent: Tuesday, February 11, 2003 7:50 PM
> To: cocoon-dev@xml.apache.org
> Subject: [flow] How can I "delete" in javascript?
>
>
> I'm using C2.1 with *flow*.
> I have to call the method *delete* of a class, in a javascript function
> of my controller layer.
> Maybe delete is a keyword in javascript and when the function is called
> I get this error:
> SyntaxError: missing name after . operator
>
> The code is:
> myClass.delete(objectToDelete);
>
> The same error using the function eval:
> eval("myClass.delete(objectToDelete)");
>
> Thanks.
> Fabio
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org