Hi All,

here is what I'm trying to do:
I'd like to extend the Ajax.Request object with a new myAjaxR object.
I'm trying to do like this:

==
var options = {user: 'myuser', pwd:'mypwd', type:'myType,
onSuccess:'success', onException:'error''};
var url = 'http://www.url.com';
var myAjax = new myAjaxR(url, options)
==

where myAjaxR is the following:

==
var myAjaxR = Class.create(Ajax.Request, {

  initialize: function($super, url, options) {
        this.setUserID(options.usr);
        this.setPassword(options.pwd);
        this.setType(options.type);
        var url = this.setUrl(this.getUserID(), this.getPassword(),
this.getType());
        $super(url, options);
  },

  success: function(){
    alert("SUCCESS");
  }

  error: function(){
    alert("ERROR");
  }
==

everything works fine when the onSuccess callback is triggered, but
when the onExeption one is, I got an error.

Can anyone help me?

Thanks a lot,

Omar

-- 
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.

Reply via email to