I am trying to learn a little about ajax and prototype.js.
Here's what I have so far:
boardtest.php
<html>
<head>
<title>AJAX Test with new javascript</title>
<script src="scripts/prototype.js" type="text/javascript"></script>
<script src="scripts/ajax.js" type="text/javascript"></script>
</head>
<body>
<div id="products">(...locaing inventory...)</div>
</body>
</html>
ajax.php
<?php
$company = $_GET['company'];
$limit = $_GET['limit'];
$line = "The company, ".$company.", has ".$limit." employees.";
echo $line;
?>
new Ajax.Updater('products', '/ajax.php', {
method: 'get',
parameters: {company: 'example', limit: 12}
});
and, of course, prototype.js, which is the standard .js file.
I know I am doing, or not doing, something that will be completely obvious to anyone who has used prototype before, but this is day 1 for me. In my effort, I get the error:
Uncaught ReferenceError: Ajax is not defined scripts/ajax.js:1
Any thoughts?
EDIT: Minor change, same error. :(