2 Replies Latest reply on Mar 20, 2009 5:06 AM by Lotfi Mellouk

    open modalPanel on A4J.AJAX.onError

    Lotfi Mellouk Master

      Hello,

      how can we show a modalPanel inside A4J.AJAX.onError function,

      this code works:

      A4J.AJAX.onError = function(req, status, message){
       if(status == 505 || status == 500 || status == 400){
       window.alert("Error: "+message + "\n Please contact administrator" );
       }
       }
      


      but if I try

      A4J.AJAX.onError = function(req, status, message){
       if(status == 505 || status == 500 || status == 400){
       Richfaces.showModalPanel('error_panel_id',{left:'auto',top:'auto'});
       }
       }


      the modalPanel will not be opened..

      env: RF 3.3.0.Ga, myfaces 1.2.5, Facelets 1.1.14.