javascript - jquery .html feature stripping tags -


i'm attempting modify elements , give them elements. table , elements created. however, upon attempting load s response text strips s. i've verified response text propping loading on it's own page, when using below code. tags stripped.

$("#records").load("get.php?"+str, function(){     $('.trclass').each(function(){         var id=this.id;         var xmlhttp=new xmlhttprequest();         xmlhttp.onreadystatechange = function() {             if (xmlhttp.readystate == 4 && xmlhttp.status == 200) {                 $('#'+id).html(xmlhttp.responsetext);             }         }         xmlhttp.open("get","get.php?read=true&"+str2,false);         xmlhttp.send();                           }); }); 

i've verified responsetext correct. i'm fine turning .append() or .load() need works. i've seen solutions involving making new div , putting table in , sending that's way hacky , don't want on get.php. looking solution. section of code.

thanks

i found solution here jquery inserted html rendered raw text

i used answer of $('div.desc').html($.parsehtml(unescape(that_string)));

and worked perfectly.


Popular posts from this blog