Setting the cursor for 'body' will change the cursor for the background of the page but not for controls on it. For example, buttons will still have the regular cursor when hovering over them. The following is what I am using:
To set the 'wait' cursor, create a style element and insert in the head:
var css = "* { cursor: wait; !important}";
var style = document.createElement("style");
style.type = "text/css";
style.id = "mywaitcursorstyle";
style.appendChild(document.createTextNode(css));
document.head.appendChild(style);
Then to restore the cursor, delete the style element:
var style = document.getElementById("mywaitcursorstyle");
if (style) {
style.parentNode.removeChild(style);
}