add parameter to settings onAjaxError/ajaxErrorHandler

Sabine Manaa <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
Hi,

I have a working solution for redirect the user to the login page as
described here [1][2][3].

In short words:
I add addLoadScript: html jQuery document onAjaxError: (self
ajaxErrorHandler asFunction: #('event' 'jqxhr' 'settings' 'exception')))
with >>ajaxErrorHandler
^ ' if (jqxhr.status == 403) { 
   alert("Logoff text......."); 
   window.location.href = settings.url.split("?")[0].replace("help",""); 
   } else { 
   if (jqxhr.status == 200) { } else {  
   alert("error text.....: " + exception +"jqxhr.status:"+jqxhr.status); }}'

I want to add one more point as described here:
http://stackoverflow.com/a/7462590/2611391

I want to suppress this error message dialog in one certain case with
something like this:
 if(settings.suppressErrors) {
        return;
    }

So my question is how can I add a value like 'suppressErrors' to my settings
object so that in the ajaxErrorHandler I can ask for
'settings.suppressErrors'... 

Regards
Sabine

[1]http://forum.world.st/Custom-error-handler-for-Seaside-expiration-and-AJAX-errors-WAS-Re-Seaside-AJAX-script-amp-html-vs-o-td4916950.html
[2]http://forum.world.st/Improved-HTML-error-handler-td4927552.html#a4927734
[3]http://forum.world.st/Ajax-requests-not-redirecting-to-Login-page-after-session-timeout-td4802509.html#a4802521

After logoff AND deleting the users account



--
View this message in context: http://forum.world.st/add-parameter-to-settings-onAjaxError-ajaxErrorHandler-tp4933109.html
Sent from the Seaside General mailing list archive at Nabble.com.
_______________________________________________
seaside mailing list
[email protected]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.