Yes but you have to create an object and assign it to your "aaa" var first, before assigning a variable value such as "bbb"
Try var aaa = {}; Niall ----- Original Message ----- From: "Michael Jouravlev" <[EMAIL PROTECTED]> Sent: Saturday, March 11, 2006 8:34 AM I am cleaning up my Javascript code. First I made all functions having prefix, so they won't mix with others' functions. Then I noticed that DOJO uses one global variable dojo, and defines everything including functions inside it. I thought that was cool, and tried it myself, but it does not work. This works: <html> <head> <script language="javascript"> var aaa; aaa = function (frm) { alert("Hi!"); }; </script> </head> <form method="post" action="qq2.html" onsubmit="return aaa (this);"> <input type="submit" /> </form> </html> This does not work (function is not called): <html> <head> <script language="javascript"> var aaa; aaa.bbb = function (frm) { alert("Hi!"); }; </script> </head> <form method="post" action="qq2.html" onsubmit="return aaa.bbb (this);"> <input type="submit" /> </form> </html> I was thinking of having one global object "aaa" and stick all my functions inside it. Is it possible? Or HTML does not allow to call expressions with dots in it? Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]