Possible Duplicate:
Calling a JavaScript function returned from a Ajax response
var url = "showpdf.php";
$.ajax({
type: "post",
url: url,
data: {academic:academic,uni:uni,course:course,lan:lan,sem:sem,subject:subject,type:type,clz:clz},
success: function(response)
{
alert(response);
document.getElementById("alldata").innerHTML = response;
}
});
inside response i have bellow html code with simple JavaScript function
<label onclick="popup()"> clickme </label>
<script>
function popup()
{
alert("hello");
}
</script>
here, this popup()function is not working please help me.