View Full Version : Mootools - Trying to use Accordion in tandem with Request.html

Nov 26th, 2008, 12:49 AM

I'm a newbie to Mootools but have really enjoyed working with it so far.

I'm working on a page that uses Request.Html to gather contents of a div. The contents in one of the divs uses according for expanding sections of the text. However, it seems that it's not working together. I know on the demo, Mootools has:

"If we had things inside this HTML that needed some MooTools love (the sort of things that go inside the domready event), we would have to call our scripts' attention to this code manually."

I'm pretty sure this is where the problem lies. Of course the accordion javascript code works in the domready. How would one go about "calling our scripts' attention to this code manually"? I've tried adding the Accordion code to the Request.Html code to see if the two files were conflicting, but it didn't work.

Any help would be MUCHLY appreciated! Thank you!

Dec 2nd, 2008, 05:53 PM
Just a bump to see if anyone can give me a hint...

Thank you!

Dec 2nd, 2008, 09:39 PM
when you request request.html is there a option for callback? like onComplete or such?
I don't know anything about mootools.

What you need to do is call the according function after the request has been made.

Dec 3rd, 2008, 10:32 PM
Hey, thanks for your reply!

This site helped me out a ton:

I was able to figure it out by altering the code to do update: instead of onSuccess.

Thanks :)