1
votes

I face the following problem with IE8: I make simple ajax call like this

   $.ajax({
            type: "POST",
            cache: false,
            url: "UpdateMessage.php",
            data: {msgID : msgID} ,     
            success:function(RETdata)
                   {    
                       pre.html(RETdata);
                   }                                    
         });

received data is just an ordinary text from MySQL database. The text is loaded in pre tag and here raises the problem. PRE tag does not deal with newly loaded text as it should be. For Example, if there are new lines ('\r\n') in the text they all vanish.

Exactly the same text looks correctly in pre tag after reloading whole web-page. In addition I provide with css code of the pre tag

 pre{
     word-wrap: break-word;
     outline-width:0;
     MIN-HEIGHT: 50px; 
     OVERFLOW-Y: hidden;
     OVERFLOW-X:auto; 
    }

but I think, my css code is not an actual issue.

1
It's deprecated 15 years ago, but try and see if it works with the old <xmp> tag ?adeneo
Thank you very much Adeneo for your comment, but I think Tomas Kirda's solution is right one.Paramore

1 Answers

1
votes

I believe you are better of using:

pre.text(data);