From 7713b06a83e6cab0d36bb9e3daf3a7f917159a44 Mon Sep 17 00:00:00 2001 From: nowa Date: Tue, 15 Jul 2008 23:30:59 +0800 Subject: [PATCH] bug fix for request --- examples/dev.html | 18 ++++++++++++- src/class/class.js | 16 +++++------ src/request/request.js | 60 ++++++++++++++++++++---------------------- 3 files changed, 53 insertions(+), 41 deletions(-) diff --git a/examples/dev.html b/examples/dev.html index 84e89db..61c1438 100755 --- a/examples/dev.html +++ b/examples/dev.html @@ -32,7 +32,7 @@ } var a = Class.create({ - implement: [Event.Customs], + implement: Event.Customs, say: function() { alert('a'); @@ -47,6 +47,21 @@ i.fireEvent('onA'); var ajax = new Request(); + ajax.addEvents({ + onCreate: function() {alert('create')}, + onRequest: function() {alert('request')}, + onSuccess: function() {alert('Success')}, + onException: function() {alert('exception')}, + on200: function() {alert('200')} + }); + ajax.send({ + url: 'http://localhost/~nowa/', + data: { + name: 'nowa', + age: 24 + }, + onComplete: function() {alert('completed')} + }); }); @@ -67,6 +82,7 @@

+