OK, I am confused. I am working on a website for a small restaurant, and have something that working great, almost. Here's my problem, and I am thinking it's with the Ajax. When the user hovers over a link on the page, I have a scritp that loads text into a div tag (In this case they hover over appetizers link, then the appetizers menu loads into the div tag) My ajax script retrieves the html file for the text and then puts that into to page. This is working but with one problem. Here's some code snippets to help illustrate.

HTML:
<div id="menu">
<a href="#" id="menuOption" name="Appetizers" onmouseover="createMenu('Appetizers')">Appetizers</a>
<a href="#" id="menuOption" name="Sides" onmouseover="createMenu('Sides')">Sides</a>

Javascript:
function createMenu(mnuItem){

switch (mnuItem) {
case "Appetizers":

document.getElementById('menuContent').innerHTML = readItem('Starters.html')
break;

More Javascript (w/ Ajax now):
function readItem(Item){
var menuLocation = "http://"+self.location.hostname+"/Smokey Canyon (rev)/menu/"+Item;
var menuText;
var xRequest;

try {
//FireFox, Safari, Opera 8+
xRequest = new XMLHttpRequest();
} catch (e) {
//Internet Explorer Browsers
try {
xRequest = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
xRequest = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {
alert("Your browser is too Old");
return false;
}
}
}

xRequest.onreadystatechange = function(){
if(xRequest.readyState == 4){
menuText = xRequest.responseText;
}
}

xRequest.open("GET", menuLocation, true);
xRequest.send(null);
alert(menuText);
return menuText;
}


OK, now I can mention the problem. If I remove that alert(menuText); then I get "undefined" in my div element, with it there, my alert says "undefined" but my page gets what I need.

Does this make any sense? Obviously I want to be able to remove that alert and get the results into my page.