Hi, I am have a problem with some Mootools code I am trying to put together.
The site I am working on (a portfolio type site) has a list of links down the left and a main content area on the right. The content area is populated dynamically via AJAX when the the links are clicked. The main content area needs to display a set of images in tabs which also uses Mootools to work.
The problem is the tabs do not work, it would appear that the AJAX is not loading the javascript content.
I am using Mootools request.HTML, the code is as follows:
I hope this makes sense, thanks in advance for any help.
The site I am working on (a portfolio type site) has a list of links down the left and a main content area on the right. The content area is populated dynamically via AJAX when the the links are clicked. The main content area needs to display a set of images in tabs which also uses Mootools to work.
The problem is the tabs do not work, it would appear that the AJAX is not loading the javascript content.
I am using Mootools request.HTML, the code is as follows:
PHP:
window.addEvent('domready', function() {
var req = new Request.HTML({url:'data.html', evalScripts:true, evalResponse:true,
onSuccess: function(html) {
$('result').set('text', '');
$('result').adopt(html);
},
onFailure: function() {
$('result').set('text', 'The request failed.');
}
});
$('makeRequest').addEvent('click', function() {
req.send();
});
});
I hope this makes sense, thanks in advance for any help.