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:[EMAIL PROTECTED]]
Sent: Tuesday, February 11, 2003 10:50 AM
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to