Hello fellow Javascript developers
I am trying to get a div to to load with a file in the same folder. Here is the code:
<HTML>
<HEAD>
<TITLE>
Div Experiment
</TITLE>
<script language="javascript" type="text/javascript" src="jquery.js">
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script>
function headsMessage()
{
alert("cat");
$("#tony").load("PrincipalsMessage .html");
alert("dog");
}
</script>
</HEAD>
<BODY>
<button align="center" onclick="headsMessage()">Click to get Scott's message</button>
<br>
<div id = "tony">
</div>
</BODY>
</HTML>
Both alerts work but the file does not load. http://www.webdeveloper.com/forum/images/smilies/confused.gif
Any ideas ?
Rory Barrett