Jun 25

PeriodicalUpdate ( using Prototype )

Tag: JavaScriptberrisch @ 10:58 am
 
updater = null;
 
function init_ajax() {
	updater = new Ajax.PeriodicalUpdater(
				'response_div' , '/proxy/frontoffice/user_request/', {
				method: 'post',
				encoding: 'UTF-8',
				parameters: Form.serializeElements( $('request_form').getInputs('text') ),
				onComplete: updater_complete,
				asynchronous: false,
				evalScripts: true,
				frequency: 2,
				decay: 1
	});
}
 
function start_request() {
	updater.start();
}
 
function stop_request() {
	updater.stop();
}

Leave a Reply