> I'm not really sure what you're trying to do here, but maybe you could
> just set some variables and have your function return those instead of
> redefining the function, such as:
>
> var Data = {
>   id:null,
>   name:null,
>   get: function(){
>     return { id: this.id, name: this.name };
>   },
>   set: function( id, name ){
>     this.id = id;
>     this.name = name;
>   }
>
> }
>
> Then your Ajax responses would have some JavaScript like:
>
> Data.set( 'my new ID', 'my new name' )
>
> And your registerAlbum would be modified to be:
>
> function registerAlbum(){
>    var albumData=Data.get();
>    albumColl.add(new Album(albumData));
>
> }
>
This seems to be a very good idea.
TIMTOWTDI.
Your vision of my problem gives me a new insight.
thanks, i'll have a go and keep you/the list posted.

have a nice evening/day/whatever

cedric

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

Reply via email to