jQuery load() Issues
jQuery load() Issues
Here's the setup:
A main page loading an external page (with javascript referencing variables from another .js file) into a div. If I don't use any javascript on the external page, it loads just fine. But if I do, it refuses to load in FF and just doesn't show the javascript in IE.
Update: In FF, it only outputs the javascript, but doesn't load the rest of the page. In IE, it loads the rest of the page and not the javascript.
Main Page: (not the whole page, but the parts that matter)
-
<script type="text/javascript" src="js/variables.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<div id="meterstable"></div>
<script type="text/javascript">
function getRandom() {
$.ajaxSetup({cache: false})
$("#meterstable").load("meterstable.html", '', callback);
$("#meterstable").show;
}
function callback() {
setTimeout("getRandom();", 5000);
}
$(document).ready(getRandom);
</script>
meterstable.html: (again, not the whole page, but the parts that matter)
-
<script type="text/javascript" src="js/variables.js"></script>
<script type="text/javascript" src="js/config.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script language="javascript">
document.write(meter1name); //defined in config.js
</script>
Any idea why this his happening?