cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Toby <>
Subject Re: Syntax of registration.js
Date Fri, 05 Jan 2007 16:43:30 GMT
Peter Flynn wrote:
> var viewData = { "username" : form.getChild("name").getValue()
>                  "date" : form.getChild("date").getValue() }

The correct syntax has a comma between the fields:

var viewData = { "username" : form.getChild("name").getValue(),
                 "date" : form.getChild("date").getValue() }

> I don't know the syntax of the registration.js file.

It's a language called JavaScript or ECMAScript.  You can find all the
documentation you need on Google or you can buy a book.

> Incidentally, the original var viewData line did not end with a
> semicolon. Should it?

It's optional.  
I never use it, but people accustomed to C/C++/Java seem to like it :-P


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message