I'm using MooTools ( part of the project ) to load a page using Request.HTML
which works fine except that I don't want the whole page, just one fragment which has an id.
This is the code in question
var req = new Request.HTML({
onSuccess: function( res ) {
// according to the docs
// res should be the node list of the remote response
// I want to grab #myFragment
var f = res.getElementById('myFragment');
// res.getElementById is not a function
var f = $(res).getElementById('myFragment');
// $(res) is null ?
var f = $$(res).getElementById('myFragment');
// [null, null] ??
// more code
}
}).get('/myurl');
I'm pretty sure this must be possible, I can grab elements that have a class. Does anyone know how to do this.
Thanks )
I hopped onto the #mootools channel on irc.freenode.net and got my answer from <kamicane> himself
I'm not familiar with Mootools but when digging into Request.HTML documentation found this:
and
Hope this would give right direction to solve your problem.