Not getting an ajax readystatechange on my page

Based on the comment by Ralf912 I tried to find out what the console and devtools in Chrome as all about. This debugger made clear what is wrong with my script, it’s not a WordPress specific problem, but in case others think it is I’ll explain.

It may be that WordPress has set up an environment which is stricter than the other straight html environment I was using for testing which is why these errors have appeared and stopped things from working.

First:
Somewhere in my editing I removed the parameters from the function call which meant the items in params weren’t defined.

Second:
These lines were creating a security violation, and nothing complained at removing both of them (based on another user’s question on stackoverflow).
ajaxRequest.setRequestHeader(“Content-length”, params.length);
ajaxRequest.setRequestHeader(“Connection”, “close”);

Finally:
The url variable includes http:// which makes the script think that it’s redirecting outside of my own domain and needed to be rewritten to just point to the local path.

The combination of these three items, which were only clear after I started using the console, when resolved allowed my script to properly run inside the WordPress environment.