var req=null;
window.addEvent('domready', function(){
req = new Request.HTML({
url: 'http://localhost/class/modules/resp.php',
method:'get',
evalScripts: true,
evalResponse:true,
onSuccess: function(html){ $('result').set('text', ''); $('result').adopt(html); },
onFailure: function() { $('result').set('text', 'The request failed.'); }
});
$('list').addEvent('click', function() { req.send('action=list'); });
$('update').addEvent('click', function(){ req.send('action=update'); });
$('delete').addEvent('click', function(){ req.send('action=delete'); });
$('detail').addEvent('click', function(){ req.send('action=detail'); });
});
Aucun commentaire:
Enregistrer un commentaire