is the event being triggered?
-----Original Message-----
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of guillem
Sent: Friday, 5 December 2008 7:23 PM
To: MooTools Users
Subject: Re: Can't make HTML request to work
According to the answers it tried the code that way, but it still
don't work:
window.addEvent('domready', function() {
if (!window.demo_path) window.demo_path = '';
var demo_path = window.demo_path;
$('makeRequest').getElement('a').addEvent('click',
function(e) {
e = new Event(e).stop(); //don't follow the href link
var myURL = this.get('href'); //get the url and store it
into a
variable
req.send();
});
var req = new Request.HTML({url:demo_path+'myURL',
onSuccess: function(html) {
$('result').set('text', '');
$('result').adopt(html);
},
onFailure: function() {
$('result').set('text', 'The request failed.');
}
});
});
then the code cay to me that the request have failed.
What about that line of code?: var myURL = this.get('href'); //get
the url and store it into a variable
Thnaks again ;)