Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

sap.m.MessageToast cannot be supported in IE9

I test this method sap.m.MessageToast.show(string); for many times in IE9, I am sure when you call this method continuous, error will be occurred, and leads to view page dead. View the error in detail below:

how I can handle and solve this bugs?

Former Member
Former Member replied

yes, I know that.

but now I solved it by adding forEach and indexOf methods for Array object. the detailed info is as followed below:

if(!Array.indexOf){

      Array.prototype.indexOf = function(obj){             

          for(var i=0; i<this.length; i++){

              if(this[i]===obj){

                  return i;

              }

          }

          return -1;

      }

  }

  

   if (!Array.prototype.forEach) { 

       Array.prototype.forEach = function(fun /*, thisp*/){ 

           var len = this.length; 

           if (typeof fun != "function") 

               throw new TypeError(); 

           var thisp = arguments[1]; 

           for (var i = 0; i < len; i++){ 

               if (i in this) 

                   fun.call(thisp, this[i], i, this); 

           } 

       }

Hope my experience can help many more people.

1 View this answer in context
Not what you were looking for? View more on this topic or Ask a question