[Mapbender-dev] JS exceptions

Christoph Baudson christoph.baudson at wheregroup.com
Thu Jan 11 06:01:20 EST 2007


Hi there,

when thinking about a return value for Mapbender JS exceptions, I 
encountered the following problem. Maybe I'm missing a central, please 
enlighten me:

when I call the JS class Mb_exception, I'll fire the Ajax post function. 
  The callback function is invoked, but it can't return the value to the 
original caller, because that's in a different function.

see http://www.mapbender.org/index.php/Talk:For_developers#return_value

Another solution might be to set a member variable of the class (boolean 
$exceptionThrown); but again, because of the asynchronous nature of 
Ajax, this would not work because I would want a return value in the JS 
code rightaway.

Any ideas?

Christoph


Christoph Baudson schrieb:
 > Hello again,
 >
 >> Thats nice. Is the online browsable version of the SVN-repository 
down at the moment?
 >
 > The link at mapbender.orgeo.org has definitely been removed, but I 
have no further information. In the meantime you can only view the plain 
text at
 >
 > https://mapbender.osgeo.org/svn/mapbender/
 >
 >> For the discussed action (loggin of an exception), all of the above 
mentioned things would work well... I'd choose the simplest thing by 
echoing the status as 'true' or 'false'
 >
 > Yes, that's what I had in mind as well. I guess that's what I'll do.
 >
 >> The JSON-thing would be wonderful, too. Some additional properties 
could be returned as string literal of an object, e.g. {loggingresult: 
'true', loggingdate: '2007-01-09', ...}, eval'ed, and could be used 
afterwards.
 >
 > Interesting, I will keep this in mind. JSON is very powerful and it 
might become handy in the future.
 >
 > Thanks, Christoph
 >
 > _______________________________________________
 > Mapbender_dev mailing list
 > Mapbender_dev at lists.osgeo.org
 > http://lists.osgeo.org/mailman/listinfo/mapbender_dev




More information about the Mapbender_dev mailing list