The javascript is not executing the AJAX request, however the script is executed without AJAX. How can I execute scripts with AJAX which would be executed without ajax.
According to the following code I want the last line to be executed
Here I make an AJAX request to script ajax1.php
document.getElementById("txtHint").innerHTML = this.responseText;
}
xmlhttp.open("GET", "ajax1.php?stateofmachine=xm234jqNewTemplateSelect" + "&q=" + str, true);
xmlhttp.send();
ajax1.php returns a table with class name as tree
echo "<table class=\"tree\">";
echo "<tr class=\"treegrid-1\">";
echo "<td>Root node</td>
echo "</tr>";
echo "</table>";
ajax1.php also returns scripts
echo "<script src=
\"http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js
\"></script>";
echo "<script type=\"text/javascript\" src=
\"js/jquery.treegrid.min.js\"></script>";
echo "<script type=\"text/javascript\">$('.tree').treegrid();</script>";