SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: onsubmit popup

  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2001
    Posts
    28
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    onsubmit popup

    I am in need of a code snippet that will popup a small window on submit to say...please do NOT click on the submit button again...the computer is thinking! or some such story. I have searched, but haven't come up with it. Does anyone have something similar?

    Many thanks!

    Marianne

  2. #2
    Victory shall be mine tubedogg's Avatar
    Join Date
    Mar 2001
    Location
    Medina, OH
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Two ways I could think of to do this...First is use onClick to pop an alert. Also I've noticed on some sites (and now I can't remember for the life of me where) that the submit button is greyed out after you push it, so you can't push it again.

    The onClick way:
    <input type="submit" name="submit" value="Submit Form" onClick="javascript:alert('Do not click submit again - the form is being processed!');">

    That should work.
    Kevin

  3. #3
    Victory shall be mine tubedogg's Avatar
    Join Date
    Mar 2001
    Location
    Medina, OH
    Posts
    440
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I found the solution to grey out the submit button, and another solution which doesn't do that but works quite well too.

    http://javascript.internet.com/forms...le-submit.html

    http://javascript.internet.com/forms/submit-once.html
    Last edited by tubedogg; Sep 6, 2001 at 04:47.
    Kevin


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
  •