[Mapbender-dev] JS exceptions

Christoph Baudson christoph.baudson at wheregroup.com
Thu Jan 11 06:57:44 EST 2007


Hi Marc,

thanks for your fast reply.

> try this (untested as usual):
> 
> function Mb_exception(message) {
>     return mb_ajax_post('../php/mb_js_exception.php', {text:message}, 
> function(text, status){
>         return (text == "true") ? true : false;
>     });
> }

at the moment I'm using jQuery. Does its function 'post' return a value? 
I didn't find that in the source code.

Mapbender uses an Ajax wrapper:

function mb_ajaxWrap_post(url, param, callback) {
	$.post(url, param, callback);
}

Would I just add the return there as well?

function mb_ajaxWrap_post(url, param, callback) {
	return $.post(url, param, callback);
}

If it does work: Will the JS be halted until the callback function answers?

A lot of questions :-)

Thanks for your patience

Christoph



More information about the Mapbender_dev mailing list