Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Prevent Double Clicking

Status
Not open for further replies.

racskelly

IS-IT--Management
Apr 19, 2007
37
CA
Hi

I'm trying to prevent users from double clicking buttons when they submit a form..

Ideally I'd like to load a flash preloader file floating in the middle of the screen when they click submit on the button.

I'm also using images as my buttons on my forms..not standard html buttons.

Any ideas?

 
Hmm, this is messy. We have to do stuff like this where I work.

I don't personally like doing any of it.

One way is to disable all your buttons when you submit the form.

Another way, (I told you I don't like it), if you have no dropdown boxes or text fields on your page is to put an absolutely positioned div with a higher z-index in front of the page, blocking clicks.

If you do have dropdown boxes or text fields, you would need to put an iframe in front of your page, then put the div on top of it.

[monkey][snake] <.
 
Is the purpse of the 'flash preloader' to indicate that something is happening?

If so you don't need to and should probably avoid Flash. You can use javascript to create/reveal an absolutely positioned div and disable/remove the button.

Actually, a better option might be to use javascript to replace the button with a 'processing' icon when it's clicked.



<honk>*:O)</honk>

Tyres: Mine's a pint of the black stuff.
Mike: You can't drink a pint of Bovril.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top