cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christopher Oliver" <coli...@SeeBeyond.com>
Subject RE: [flow] How can I "delete" in javascript?
Date Tue, 11 Feb 2003 18:52:54 GMT
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 
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


Mime
View raw message