Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 42679 invoked by uid 500); 11 Feb 2003 18:52:50 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 42638 invoked from network); 11 Feb 2003 18:52:50 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [flow] How can I "delete" in javascript? Date: Tue, 11 Feb 2003 10:52:54 -0800 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [flow] How can I "delete" in javascript? Thread-Index: AcLR/pcT+fJL3EpGTMOfuz4Eh/Q0igAAAc9w From: "Christopher Oliver" To: X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N The workaround for using javascript keywords (like delete) as property = names is to use the [] notation instead of ".", i.e.: myClass["delete"](objectToDelete); Regards, Chris -----Original Message----- From: Fabio Sabatini [mailto:f.sabatini@cbim.it] Sent: Tuesday, February 11, 2003 10:50 AM 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=20 of my controller layer. Maybe delete is a keyword in javascript and when the function is called=20 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