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

Discussion in 'Javascript' started by coolsolap@gmail.com, Nov 28, 2006.

  1. Guest

    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, 2006
    #1
    1. Advertisements

  2. Evertjan. Guest

    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)
     
    Evertjan., Nov 28, 2006
    #2
    1. Advertisements

  3. 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
     
    Bart Van der Donck, Nov 29, 2006
    #3
  4. Bart Van der Donck wrote:
    > 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.
     
    Richard Cornford, Nov 29, 2006
    #4
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Francesco
    Replies:
    2
    Views:
    365
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Jan 14, 2007
  2. Paul
    Replies:
    0
    Views:
    294
  3. Blair Taylor
    Replies:
    1
    Views:
    456
    Alvin Bruney
    Aug 7, 2003
  4. James Radke
    Replies:
    1
    Views:
    356
    Mike Moore [MSFT]
    Nov 7, 2003
  5. Jazzis
    Replies:
    2
    Views:
    414
    Jazzis
    Sep 23, 2003
  6. Replies:
    5
    Views:
    500
    Olivier Renaud
    Mar 15, 2007
  7. pentium77

    Can this be done in JavaScript ?

    pentium77, Oct 4, 2004, in forum: Javascript
    Replies:
    3
    Views:
    109
    Robert
    Oct 5, 2004
  8. Zhidian Du
    Replies:
    0
    Views:
    303
    Zhidian Du
    Feb 21, 2004
Loading...