If you want instead of adding event to button in custom form to add ajax to some link (javascript function) here is how you can do it:
function show(options)
{
$('update').innerHTML = '<div align=".'"center"'.">
<img src="/.'"images/ajax-loader.gif" width="66" height="66"/>'."<p/>Please wait</div>'
var ajaxRequest = new Ajax('index.php', {
method: 'get',
onComplete: function(response) {
$('update').innerHTML = response;
}
});
ajaxRequest.request(options);
}
Where options are variables which you sent through ajax, for example:
<a onclick="show('option=com_regdavzav&task=result&format=raw&pageNumber=2&naziv=ANGEL')" href="#">2</a>
It seems that mootools which are coming with Joomla! old, so documents about mootools which are in Joomla! you can find here.