DelphiFAQ Home Search:
General :: Web publishing :: JavaScript
Code snippets to add functionality to your HTML pages, preferably cross-browser.

Articles:

This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Featured Article

How to change the cursor?

Question:

Is it possible to select a certain cursor (e.g. the hour glass) for a web page?

Answer:

Internet Explorer offers this since version 4 and Netscape since version 6. The relevant property is document.body.style.cursor.

You can script it as shown in the example or make it part of a CSS (makes less sense in my opinion).

Note:
IE 4 and 5 use the name 'hand' for the hand cursor, IE 6 and Netscape 6 call it 'pointer'
.

document.body.style.cursor = 'wait';
 
 // this takes time
 // calculating something
 
 document.body.style.cursor = 'auto';
 

Generated 0:02:38 on Nov 25, 2017