The ajax script does not do anything when I press one of the links. How can I fix this problem?
The actual page: http://www.roastedgarlic.ws/calendar/bar.php
bar.php
Code:
<html><head>
<script language="javascript" type="text/javascript" src="internal_request.js"></script>
</head>
<body>
<?php
  echo '<h1>Latest Events</h1>';
  echo '<ul>';
  $query = "SELECT * FROM events WHERE date >= NOW() ORDER BY date, starttime";
  $result = mysqli_query($dbc, $query);
  $numrows = mysqli_num_rows($result);
  
  if($numrows == 0) {
    echo 'No events!';
  }
  else {
    while($row = mysqli_fetch_array($result)) {
      echo '<li><a href="#" onclick="getEvent(' . $row['id'] . ')">' . $row['name'] . '</a> (<i>' . $row['date'] . '</i>)</li>';
    }
  }
  echo '</ul>';
internal_request.js
Code:
function createReqestObject(){
  var request_o;
  var browser = navigator.appName;
  if(browser == "Microsoft Internet Explorer") {
    request_o = new ActiveXObject("Microsoft.XMLHTTP");
  } 
  else{
    request_o = new XMLHttpRequest();
  }
  return request_o;
}

var http = createRequestObject();

function getEvent(eventid){
  http.open('get', 'internal_request.php?action=getevent&id=' + eventid);
  http.onreadystatechange = handleEvent;
  http.send(null);
}

function handleEvent(){
  if(http.readyState == 4){
    var response = http.responseText;
    document.getElementById('eventcage').innerHTML = response;
  }
}
internal_request.php
Code:
<?php
  session_start();
  require('config.php');

  if($_GET['action'] == 'getevent') {
    $query = "SELECT * FROM events WHERE id = '" . $_GET['id'] . "'";
    $result = mysqli_query($dbc, $query);
    $row = mysqli_fetch_array($result);
  
    echo '<h1>Event Details</h1>';
    echo $row['name'];
    echo '<p>' . $row['description'] . '</p>';
    echo '<p><strong>Date:</strong> ' . date('D jS F Y', strtotime($row['date'])) . '<br>';
    echo '<strong>Time:</strong> ' . $row['starttime'] . ' - ' . $row['endtime'] . '</[';
  }
?>
As I understand it, when I click on one of the links inside the bar, I am supposed to be able to view the details in the event cage, but when I click it, nothing happens.