On 17 Lut, 12:14, "T.J. Crowder" <[email protected]> wrote:
> Hi,
>
> What's the error?
> --
Error: Cannot convert undefined or null to Object
Slider class is a base class and doit() method is redefined in
subclasses. I see that calling fun() works, but i get error in
redefined method doit().
Redefinition here:
var SliderCategory = Class.create(Slider, {
initialize: function($super, elContainer) {
$super(elContainer);
},
doit: function() {
new Ajax.Updater(this.elContainer,'category_add.php',{
onCreate: function () {
}.bind(this),
onComplete: function(request,result) {
}.bind(this)
});
},
...
}
Error is in prototype.js:
....(cut)...
Ajax.Updater = Class.create(Ajax.Request, {
initialize: function($super, container, url, options) {
this.container = { // <----- ERROR Cannot
convert undefined or null to Object
success: (container.success || container),
failure: (container.failure || (container.success ? null :
container))
};
options = Object.clone(options);
var onComplete = options.onComplete;
options.onComplete = (function(response, json) {
this.updateContent(response.responseText);
if (Object.isFunction(onComplete)) onComplete(response, json);
}).bind(this);
$super(url, options);
},
....(cut)...
I've pasted in pastie.org too for better view
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" 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/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---