Results 1 to 2 of 2

Thread: No. of clicks for Submit button

  1. #1
    Join Date
    Jul 2006
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default No. of clicks for Submit button

    How do I determine if the user clicked a "Submit" button twice in the page?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    No, you can't. It's not something that is sent to the next page.

    However, I assume you are trying to prevent spamming/duplicate messages/etc.

    The way to do that is to use a database (or other tracking method, perhaps txt files on the server) to keep track of the last submission. If it matches, ignore the second one.

    Really, that's the only thing you can do.

    However, you could also add javascript to the submit button that would grey it out once clicked one time, so you couldn't click it again. However, that isn't foolproof, and there are ways to make it submit again. But, it would at least limit it, then you could do the above to make it flawless.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •