Results 1 to 2 of 2

Thread: Disabling a Button after its submitted, FF & IE issue. -[RESOLVED]-

  1. #1

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Resolved Disabling a Button after its submitted, FF & IE issue. -[RESOLVED]-

    The code I'm using is basically:
    HTML Code:
      <script language="JavaScript">
      <!--
      function DisableButs()
      {
        document.getElementById('form1').submit.disabled = true;
        document.getElementById('form1').back.disabled = true;
        document.getElementById('form1').reset.disabled = true;
        return true;
      }
      //-->
      </script>
    
    
    
    
    
    <input TYPE="submit" NAME="submit" VALUE="Continue" onclick="DisableButs();" />
    Submit, Back & Reset are all buttons on the form.
    This works fine in FF however in IE when i click the button it seems that it disables the button before it can submit. The back button works fine still, because it goes back a page using a second statement in the onclick event.
    Should I be submitting the form in the javascript after the disable buttons call?

    If so how do I do that .
    Last edited by Electroman; Dec 28th, 2004 at 11:29 AM.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  2. #2

    Thread Starter
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349

    Re: Disabling a Button after its submitted, FF & IE issue. -[RESOLVED]-

    Doh, I solved it already.

    I tried
    HTML Code:
    <input TYPE="button" NAME="submit" VALUE="Continue" onclick="document.getElementById('form1').submit(); DisableButs();" />
    But it didn't work. I had to change the name of the submit button to somethign else, cos it couldn't tell the differance between the Button Submit and the function submit .
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

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