I know it’s possible, and I’ve looked at numerous examples. And I’m afraid I already know the answer to my question, but perhaps I’m missing something.
I was thinking that this does not work because I am running this code locally, and not on a server.
In my head tag:
<script type="text/javascript" src="jquery-1.5.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#test").load("test.html");
} );
</script>
In my body tag:
<div id="test"></div>
My external code (inside ‘test.html”)
<div>This is what you should be seeing!</div>
Shouldn’t this work?
Additionally, in my external html document, do I need set it up with all the extra tags, so that the document would look like:
<html>
<head>
<title>
</title>
</head>
<body>
<div>This is what you should be seeing!</div>
</body>
</html>
All my files are in the same directory.
Thanks.
Well your code should work on webserver! Please let me know if you are doing it from you desktop.