On 5/17/07, Yan Rong <[EMAIL PROTECTED]> wrote:
>
>
> now i'm learning the Beast source code,
> but a problem happened when read the javascript like below:
>
> var TopicForm = {
>   editNewTitle: function(txtField) {
>     $('new_topic').innerHTML = (txtField.value.length > 5) ?
> txtField.value : 'New Topic';
>   }
> }
>
>
> what's the meanning of
> "  var xxx = {
>
> } "  ?
>
> i haven't known such using....
>
> appricated if you can give me some adivce or any useful link :)
>
> thanks!

var xxx = ... is what we in the porn industry use to declare
javascript variables.  The brackets ( {}'s ) is used for declaring an
object literal.

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Guide:Literals#Object_Literals

Also, you'll probably get more intelligent responses in the
rails-spinoff thread, which is dedicated to prototype/scriptaculous.

-- 
Rick Olson
http://lighthouseapp.com
http://weblog.techno-weenie.net
http://mephistoblog.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Deploying Rails" group.
To post to this group, send email to rubyonrails-deployment@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-deployment?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to