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

C

coolsolap

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
 
E

Evertjan.

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"!]
 
B

Bart Van der Donck

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.
 
R

Richard Cornford

Bart said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,763
Messages
2,569,562
Members
45,038
Latest member
OrderProperKetocapsules

Latest Threads

Top