Im using jquery to call a page via ajax. I have some jquery functions that load inside the returned html from the page being called from ajax. The problem is Im trying to include the js file inside the returned data, it gives back the html but seems to strip the script tag:
function buildDisplayResults()
{
$.ajax({
method: 'get',
cache: false,
url : '/display_results.php',
dataType : 'text',
success: function (text) { $('#showresults').html(text); }
});
}
The returned data I have <script src="/js/display.js"></script>
That script code above always gets stripped out, but I need it in the returned data so the functions work inside the data the ajax call sends back. Any ideas?