Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7940253
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:20:00+00:00 2026-06-03T23:20:00+00:00

How do I enable a sumbit button after a php script ends? For example:

  • 0

How do I enable a sumbit button after a php script ends?

For example:

In my index.php page I have a submit button who is disabled by default, and after a php script (script.php) ends I want to enabled it.

The idea sp far is put a boolean variable in the end of script.php, so when it ends I set it to true. But how do I continue check if the boolean variable changed to true? I’m guessing that we use ajax…I already know how to disable the html button.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T23:20:02+00:00Added an answer on June 3, 2026 at 11:20 pm

    At the end of script execution create a file and at the front-end, continously check if that file exists. This is how you do this in jQuery.

    function ft(){
        $.ajaxSetup({
            cache: false 
        });
        $.ajax({
            url: "enable.txt", 
            method: 'get',
            error: function(){return true;}, //if 404 error continue the request
            success: function(data){
                $("#your_element").attr("disabled","false");
                window.clearInterval(timeOutId); //Stop the request of getting the file,
            }
        });               
    };
    
    $(document).ready(function(){
        timeOutId = window.setInterval("ft()", 10000); //repeat after 10 seconds.
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form, and want to disable/enable its submit button depending on whether
I have a problem: after enable button, it look like enabled but isn't clickable.
Within an ASP.NET AJAX UpdatePanel on my page I have a submit button which
I want to enable a button after that i have opened a jquery dialog
How to enable the submit button in my HTML form and disable if checkbox
I have two forms named form1 and form2 in a php page. I have
I'm trying to use jquery to enable a form button only after a radio
So I want to enable a submit button whenever an option in my select
I have a button in my webpage with below code - HTML: <button type="submit"
Details: Only disable after user clicks the submit button, but before the posting back

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.