me gustaría saber como puedo ejecutar una función javascript independiente del Ajax cuando éste se haya ejecutado con éxito.
El Ajax que tengo es:
Código HTML:
 function showAlert() {
	var target = $('alerta');
	if (!target) return false;
		new Ajax.PeriodicalUpdater(target, 'pagina.php',{frequency:'100'});
}
Event.observe(window, 'load', showAlert, false);
Código HTML:
 showAlertPopup(true);
He probado a ponerlo en el onSuccess y quedaría así:
Código HTML:
 function showAlert() {
	var target = $('alerta');
	if (!target) return false;
		new Ajax.PeriodicalUpdater(target, 'pagina.php',{frequency:'100', onSuccess: showAlertPopup(true)});
}
Event.observe(window, 'load', showAlert, false);
¿Alguna idea? Gracias y saludos!
 
 
