Okay, so I'm new to JSON. Did some reading and got exited. Look both easy and looks like what I need.
I've written a dynamic absolute-div-"windowing system" for my own web appilcation. Works great.
Now to get the thing to work the way I intend, here's what I plan to do to "fill" those windows:
AJAX the data-content AND css/xhtml formatting object into my windows -both as JSON.
As far as I can see, this can be done with AJAX -do correct me if I'm wrong?!
This is the way I found to extend a base class. It works, but doesn't seem all that good and it doesn't really accomplish what I am looking to do:
Is this the right/only way to extend/inherit from superclasses in JSON?
QUESTION : Can I prototype "on top" of my "myJSON" prototyped object? The goal is to create generic classes to be AJAXed...
Any advice is greatly appreciated. Links, books whatever you see fit ;-)
Thanks
I've written a dynamic absolute-div-"windowing system" for my own web appilcation. Works great.
Now to get the thing to work the way I intend, here's what I plan to do to "fill" those windows:
AJAX the data-content AND css/xhtml formatting object into my windows -both as JSON.
As far as I can see, this can be done with AJAX -do correct me if I'm wrong?!
This is the way I found to extend a base class. It works, but doesn't seem all that good and it doesn't really accomplish what I am looking to do:
Code:
baseJSON = function() {
var F = function() {
};
return F;
}
myJSON = baseJSON();
myJSON.prototype = {
init : function() {
if(arguments.length>0)
this.name = arguments[0];
else
this.name = 'Master - you forgot to initialize with your name!';
this.run();
} ,
run : function() {
alert('Hello '+this.name);
}
}
var newObj = new myJSON();
Is this the right/only way to extend/inherit from superclasses in JSON?
QUESTION : Can I prototype "on top" of my "myJSON" prototyped object? The goal is to create generic classes to be AJAXed...
Any advice is greatly appreciated. Links, books whatever you see fit ;-)
Thanks