Results 1 to 7 of 7

Thread: Disabling submit button

  1. #1
    Guest

    Post

    After someone presses the submit button, i want to disable it. How do i do that?

  2. #2
    Guest
    I'm not sure if this is what you're after...

    <INPUT TYPE="submit" onClick="this.disabled=true">

    Paul

  3. #3
    Guest
    I think thats javascript right, is there anyway to do it without a client side script? The site is done in PHP so if there is some way to do it in PHP, that would be great.

  4. #4
    Guest
    Sorry, I don't know anything about PHP. Could your PHP script write the JavaScript for you? You could do a similar thing on load:

    <BODY onLoad="frmWhatever.btnSubmit.disabled=true">

    where...

    <FORM NAME="frmWhatever">
    <INPUT NAME="btnSubmit" TYPE="submit">
    </FORM>


    Paul

  5. #5
    Guest
    The reason i dont want to use javascript, is cuz not everyone has javascript enabled. So if theres some way to do it in HTML or server side, then it will work with all browsers.

  6. #6
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Well if you don't use client-side scripting then you have absolutely no control over the page the user is viewing unless they request something from you, which will happen when they click the submit button. You could do something in the page that the submit button submits to, but I don't quite know what you're doing so I can't really say much more about that.
    Harry.

    "From one thing, know ten thousand things."

  7. #7
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    you could have a normal button?

    then have it check if it should submit or not?

Posting Permissions

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



Click Here to Expand Forum to Full Width