Wednesday, September 02, 2009

JavaScript to control mouse cursor

The following JavaScript can be used to change the cursor to an hourglass while the form is being submitted.
document.body.style.cursor='wait'

Example form:-

<form action=\"ReleaseInsData.do\" method=\"POST\" onsubmit=\"document.body.style.cursor=\'wait\';
javascript:return releaseButtonClicked();\">
</form>


To return back to the original cursor view you can use:-
document.body.style.cursor='auto';

No comments:

Post a Comment

Thank you for your feedback