There are 2 classes FormExt, AjaxRequest I create a FormExt object and when the user submit the form, then I will call another AjaxRequest Object When the AjaxRequest finish the process, then it will trigger onComplete
I would like the onComplete method will call the FormExt.reset() so hwo to do this? I must pass the FormExt obj to the AjaxRequest??? and other method??? var FormExt = Class.create({ initialize: function(id){ this.id=id; this.obj=$(this.id); this.ajaxObj=''; this.eventSubmit=this.submit.bindAsEventListener(this); Event.observe(this.id, 'submit', this.eventSubmit); }, submit:function(e){ this.ajaxObj=new AjaxForm(this.id); this.ajaxObj.startAjax(); break; }, reset:function(){ this.obj.reset(); } }); var AjaxRequest = Class.create({ initialize: function(id){ this.frmObj=$(id); this.ajaxObj=''; }, startAjax: function(){ this.ajaxObj = new Ajax.Request( 'abc.php',{ onComplete:this.onComplete.bind(this) } ); } onComplete:function(){ alert('complete now'); } }); --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-core?hl=en -~----------~----~----~----~------~----~------~--~---