Resolved. Sorry to type the question before searching thoroughly. For POST request I had to set content-type header:
ajaxRequest.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); Michael. On 3/11/06, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > 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]