By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,256 Members | 1,700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,256 IT Pros & Developers. It's quick & easy.

Pause/freeze session for sec(s), can b done in JavaScript?

P: n/a
Hi, :) I have a program which I need to have temporarily freeze user
input for about 8 seconds. Is there a method using JavaScript only to
freeze the mouse-cursor in a invisible position on the screen for a
pre-set duration? Sincerest Regards, AmySol

Nov 28 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
wrote on 28 nov 2006 in comp.lang.javascript:
Hi, :) I have a program which I need to have temporarily freeze user
input for about 8 seconds. Is there a method using JavaScript only to
freeze the mouse-cursor in a invisible position on the screen for a
pre-set duration? Sincerest Regards, AmySol
If you are talking clientside javascript in a browser on a windows p.c.,
the answer is:

no.

The mouse is not owned by you or even by the browser window where your page
is displayed, so that window has no rights on the browser and neither have
you.

["need"? "want"!]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Nov 28 '06 #2

P: n/a
co*******@gmail.com wrote:
Hi, :) I have a program which I need to have temporarily freeze user
input for about 8 seconds. Is there a method using JavaScript only to
freeze the mouse-cursor in a invisible position on the screen for a
pre-set duration?
In MSIE you can use an image for the mouse cursor; you could set that
to a transparent one:

<body style="cursor: url(img/transparent.ani)">

And/or you could constantly focus the cursor on, say, a form element
that is hidden somewhere. Focus it 10 times a second or something like
that. Rather dirty, but should work.

--
Bart

Nov 29 '06 #3

P: n/a
Bart Van der Donck wrote:
co*******@gmail.com wrote:
>Hi, :) I have a program which I need to have temporarily freeze user
input for about 8 seconds. Is there a method using JavaScript only
to freeze the mouse-cursor in a invisible position on the screen for
a pre-set duration?

In MSIE you can use an image for the mouse cursor; you could set that
to a transparent one:

<body style="cursor: url(img/transparent.ani)">

And/or you could constantly focus the cursor on, say, a form
element that is hidden somewhere.
Would that be good UI design. A wait cursor would be most appropriate,
along with scripting to ensure that user input would be disregarded
during the critical period.
Focus it 10 times a second or something like
that. Rather dirty, but should work.
Attempting to focus form fields that are hidden (by type, CSS display
and/or visibility) tends to throw exceptions in some environments (so
would not work to control user input).

Richard.
Nov 29 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.