221 users online (0 members and 221 guests)  

  Results 1 to 2 of 2


  1. enable and disable submit button    Forum: PHP Forum
    Replies: 1
  2. Replies: 3
  3. Disable Refresh and Back button??    Forum: HTML Forum
    Replies: 27
  4. Replies: 4
  1. #1
    zzz's Avatar
    New User

    Join Date
    Jan 2009

    Post submit button enable and disable

    Dear all,

        $disable = true;
    <form action="" method="post" name="form1">
    <input name="ch1" type="radio" value="a" />
    <input name="ch1" type="radio" value="b" />
    <input name="ch1" type="radio" value="c" />
    <input name="push1" type="submit" value="SET" class="style24" <?php if($disable) echo 'disabled="disabled';?>/>
    As per my application i have a client and server architecture we have a trainee and trainer part.So here trainer set some fault using the radio button selection and then clicking the submit button. So once trainer select a radio button and then click submit button this will be written into a file and submit button will be disabled until trainee recovers this fault.So my submit button will be disabled until trainee recovers from this fault.So i get a reply.So i keep on be checking.Once i get a reply from trainee this will be in terms of a file.So i need to keep on be checking that file.If there is a change then i need to again the disabled submit button.

    As per the above mentioned code,here once we select a radio button and then click submit button the submit button will be disabled.Now my problem arises after this.Here the submit button must be enabled.Pls anyone help me in this regard.

    waiting for reply
    Last edited by vinyl-junkie; 01-17-2009 at 10:24 AM. Reason: Added code tags

  2. #2
    jthayne's Avatar

    Join Date
    Aug 2008

    Re: submit button enable and disable

    Ok. Let me make sure I understand how you want things to work.

    1. User (trainee) is presented with a form.
    2. User selects one radio button and submits the form
    3. The form is submitted back to itself, and the button is disabled.
    4. The value the user selected is written to a text file.
    5. Once the value is written to the text file, the button is enabled, and the form can be submitted again.

    If that is correct, let me know which steps you are having problems with.

    Thank you

Tags for this Thread