The documentation notes that when using the $.ajax() functions option datatype="html":
"html": Returns HTML as plain text; included script tags are evaluated however, it does not appear to me that this is happening. What am I missing? My very simple code is here: ----------------- ... $.ajax({type:"GET",dataType:"html",url:"test.htm",success:function(dta) { alert(dta); }}); ... ---------------- ----test.htm-- <div>hello</div> <script language="JavaScript"> alert("hello?"); </script> -------------- I do get my alert with the content from alert(dta), but I never get an alert with "hello?". What am I missing?