views:

587

answers:

1

Does anyone know if, using one Request.HTML call from MooTools, it is possible to somehow update more than one element in a webpage? The current call I have is:

var req = new Request.HTML({update: $('content')}).get('../latest_events');

This updates the content div in my page with the "../latest_events" page. Is there a way to update other divs with the "../latest_events" page using this same call, or do I have to just use separate calls?

A: 

Yes, you can do whatever you want with the request data after you've obtained it. Just add a success event function to your Request.HTML options and handle the responseText by hand. Documentation about the events available to Request.HTML is available here:

http://mootools.net/docs/core/Request/Request

Always remember to check if a Mootools class extends another (it'll be noted at the top of the class). Typically you'll have to go all the way up the class tree to find the basic events associated with the class (as is the case with Request.HTML).

One Crayon