I am calling jquery ajax call,
$.ajax({
type: "post",
url: formLink,
cache: false,
data: ......,
success : function(responseHTML) {
$(".abc").html(responseHTML);
}
});
Now in “.abc”, lets say,
<html>
..............
</html>
<script>
alert("11"); //Not getting this alert
</script>
even tried with
$(document).ready(function () {
alert("11");
});
Not able to get alert even after the success, Please help
Thanks in advance
if the doctype is not of html5 then you will need the type attribute on the script tag
oh.. and i hope you are not returning
<html>tag in the response – only return a fraction of the html you need.and if you can – return it with attributes that can be analyzed at the success call and init your js function from there
also remove the $(document).ready this event happened long before your ajax call, and will not happen again when you refresh a part of the page