1. you mentioned html you might look at Request.HTML2. onComplete fires when the request is complete you probably want to attach an event listener to onSuccess. 3. onSuccess receives multiple parameters depending on which class you end up using Request or Request.HTML
make sure the param you want you pass to your update function: MYOSC.Cart.update(html); On Mon, Apr 13, 2009 at 12:46 AM, Dailce <i...@rogers.com> wrote: > > Hi, > > I can't seem to get Request to work properly. > Here is part of the code: > > ....... > ....... > ....... > ....... > add: function(e, clicked) { > new Event(e).stop(); > new Request.HTML({ > url: this.getProperty('action'), > data: $(this), > onComplete: function(){ > MYOSC.Cart.getShortList(); > MYOSC.Cart.clicked = clicked || false; > } > }).get() > }, > getShortList: function() { > new Request.HTML({ > url: MYOSC.Base.uri + 'index.php', > data: { only_page: 1, > page: "shop.basket", > option: "com_cart2" > }, > onComplete: function(){ > MYOSC.Cart.update(); > } > }).get() > }, > update: function(response) { > alert('update ' + response); > ....... > ....... > ....... > > Basically my onComplete is returning undefined, and therefore I can't > get my update function to work properly. Not sure what I'm missing. > Please help :( > What I want to do is pass the html code (or response) to the update > function, so I can update part of the web page. > > > >