Uncaught ReferenceError: Ajax is not defined scripts/ajax.js:1
Any thoughts?
yes, you can't prototype from a nonexisting object!
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
"Ajax is not defined" - says it all.
Meaning ther is no 'Ajax' object. Not even in jour js file. Otherways, the syntax "new Ajax " would be correct.
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
Easy Troy, Ajax is defined inside the prototype library.
I don't know, I haven't seen it. Did you. What if prototype.js is empty, or if there is no Ajax object defined there at all?If I had to guess, his own ajax.js is executing before prototype has finished its business. Try wrapping the stuff in ajax.js in a function that is called by the onload event of the body. Its also possible that prototype hasn't loaded at all, in which case just make sure you have the correct path to the file specified.
That's what I've said.
He/she is trying to prototype from object named Ajax, which simply isn't there!
To make sure it's something else - we'll have to see the source first.
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
I feel a little silly. Normally, the path is the first thing that I check. It was one of those "hang your head and laugh until you cry" moments. The path was fixed, and now everything works.
TroyIII - I thought that the length and standard of prototype.js didn't need to be re-supplied. If you need to see the source, you can download it from: prototypejs.org .
As you see, you need to learn to trust them 'error reports'!
If its says "Ajax is not defined", it means its not. it isn't there.
That's why [when you are at knowlledge that the call to is defined] you first check if the source is right. That is, if the actual file is at the location exactly specified or not.
My stating that your script is correct, would be good enough for you to foresee the posibility that your reference to it might be wrong.
But since you were so certain that it was right, I had to pressume that its either the wrong content in the referenced file or that the whole content might be missing.
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80