[Mediawiki-l] do an ajax call

Michael Heyder Info at hafenvolleyballer.de
Wed Sep 12 01:36:59 UTC 2007


Hi quite some problems doing an ajax call.

I wanna check if a pagetitle exists!

js
function checkout(){
...
elem1.value is the value of a input field
naw_title is the id of the input field

var test=sajax_do_call( "wfAjaxCheckPageTitle", [ elem1.value ], naw_title);

I registered ajax reaction

$wgAjaxExportList[] = 'wfAjaxCheckPageTitle';

function wfAjaxCheckPageTitle( $title ) {
	global $wgOut;
	
	return 'test' ;
}

So if the title exists i wanna send back a errormessage, else nothing

regards
mic




More information about the MediaWiki-l mailing list