Do Events Run in Threads?

Discussion in 'Javascript' started by Tom Frantz, Dec 22, 2004.

  1. Tom Frantz

    Tom Frantz Guest

    I'm using IE 6.0 for Windows.

    I have a table with several rows where each row has a column that contains
    two checkbox controls ("approve" & "reject"). A form (separate from the
    table) is submitted each time one of the checkboxes is clicked and the
    response is targeted to an <iframe> on the same page. I would like to be
    able to prevent the user from clicking another checkbox until after the
    response comes back from the form submitted.

    I've tried handling this by setting a global variable to true whenever the
    form gets submitted, but that doesn't seem to work all of time. If I keep
    clicking very quickly I can sneak multiple submissions through. I'm trying
    to figure this out and all I can come up with is that perhaps IE (and
    perhaps other browsers) run events such as onclick in their own threads?

    Is that true? Anyone have a good idea of how to code something that will
    prevent another form submission until after the response comes back from the
    form?
    Tom Frantz, Dec 22, 2004
    #1
    1. Advertising

  2. Tom Frantz <> wrote in message
    news:...
    > I'm using IE 6.0 for Windows.
    >
    > I have a table with several rows where each row has a column that contains
    > two checkbox controls ("approve" & "reject"). A form (separate from the
    > table) is submitted each time one of the checkboxes is clicked and the
    > response is targeted to an <iframe> on the same page. I would like to be
    > able to prevent the user from clicking another checkbox until after the
    > response comes back from the form submitted.
    >
    > I've tried handling this by setting a global variable to true whenever the
    > form gets submitted, but that doesn't seem to work all of time. If I keep
    > clicking very quickly I can sneak multiple submissions through. I'm

    trying
    > to figure this out and all I can come up with is that perhaps IE (and
    > perhaps other browsers) run events such as onclick in their own threads?
    >
    > Is that true? Anyone have a good idea of how to code something that will
    > prevent another form submission until after the response comes back from

    the > form?
    >

    How about some code? You need to be certain that the flag is inspected and
    set prior to allowing .submit() to be called.
    --
    S.C.
    Stephen Chalmers, Dec 23, 2004
    #2
    1. Advertising

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. yoda
    Replies:
    2
    Views:
    420
    =?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=
    Aug 1, 2005
  2. threads without threads

    , Aug 27, 2004, in forum: C Programming
    Replies:
    4
    Views:
    384
    William Ahern
    Aug 27, 2004
  3. Pedro Pinto

    Java Threads - Get running threads

    Pedro Pinto, Apr 8, 2008, in forum: Java
    Replies:
    2
    Views:
    1,404
    Arne Vajhøj
    Apr 9, 2008
  4. Chris

    Events Events Events Please Help

    Chris, Aug 30, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    341
    Chris
    Aug 30, 2005
  5. Une bévue
    Replies:
    0
    Views:
    132
    Une bévue
    Jun 14, 2006
Loading...

Share This Page