So I have two pages: index.php and contents.php. Index.php is doing an XMLHttpRequest to grab a table from contents.php... But when Index.php displays the response.Text, it doesn't run the Javascript originally on contents.php (because it's just displaying the contents, not running the script).
Trying to solve this problem, I simply put the code on index.php rather than contents.php, but for some reason the javascript wont find any elements displayed by the responseText.
(i.e document.getElementById('contents-table').innerHTML = 'asdf';