i wanna call the different file on click on hyper link but using mootools ajax it's not made possible through my way so give our suggestion
A:
It's all in the documentation:
Request: http://mootools.net/docs/core/Request/Request.HTML
Event handling: http://mootools.net/docs/core/Native/Event
<a href="some-file-1.html">Lipsum</a>
<a href="some-file-2.html">Lipsum</a>
MooTools:
$$('a').each(function(link){
var linkHref = link.get('href');
link.addEvents({
click: function(e){
e.stop();
new Request.HTML({
url: linkHref,
update: $('element-to-update')
}).send();
}
});
});
Oskar Krawczyk
2010-01-04 11:51:15