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

  • Home
  • SEARCH
  • 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 149251
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T09:06:04+00:00 2026-05-11T09:06:04+00:00

My users keep complaining that a link does not show up for them. For

  • 0

My users keep complaining that a link does not show up for them. For me, I have tested this on several browsers and it works for me.

What should happen is that a process is started via AJAX using JQuery and once that is done I keep checking with the server via AJAX how much of the process has been done and once the process is complete I show them a link. But a lot of users tell me that it shows them the link and it quickly disappears back to showing 100.0%!

I can’t see how I can fix this and I was hoping you guys could help me write something fool proof so that the link is always shown!

Here is the code concerned (its been shortened).

var startTime; var continueTime; var done = false; function convertNow(validURL){        startTime = setTimeout('getStatus();', 6000);         $.ajax({        type: 'GET',        url: 'main.php',        data: 'url=' + validURL + '&filename=' + fileNameTxt,        success: function(msg){       done = true;            $('#loading').hide('slow');       $('#done').html('LINK SHOWN HERE');           }//function       });//ajax  }//function convertNow function getStatus() {                if(done==false){                     $.ajax({         type: 'POST',         url: 'fileReader.php',         data: 'textFile=' + fileNameTxt,         success: function(respomse){         textFileResponse = respomse.split(' ');         $('#done').html('PROGRESS SHOWN HERE IN PERCENTAGES');         }         });//ajax         continueTime = setTimeout('getStatus();', 3000);          } } 

Thanks all

P.S. I have this question before and was given an idea of using a conditional in the function but that didn’t work when it should have!!

UPDATE

I have some of my users what OS and browsers they are using and they usually say a Mac Os and firefox or safari. Not sure if that help with the solution.

  • 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. 2026-05-11T09:06:04+00:00Added an answer on May 11, 2026 at 9:06 am

    The behaviour described by the users suggests that the success callback of your getStatus function is called after the one in convertNow. You should test done variable in this callback

    function getStatus(){     if(done==false){         $.ajax({             type: 'POST',             url: 'fileReader.php',             data: 'textFile=' + fileNameTxt,             success: function(respomse){                 // FIX : Already done, just ignore this callback                 if (done) return;                  textFileResponse = respomse.split(' ');                 $('#done').html('PROGRESS SHOWN HERE IN PERCENTAGES');                  // BONUS : call getStatus only when previous ajax call is finished                 continueTime = setTimeout('getStatus();', 3000);             }         });//ajax     } } 

    EDIT : This solution should prevent the bug from appearing most of the time, but there is still a chance. The only way to be sure is to remove the callback from convertNow and let the one in getStatus set the link when the processing is done (don’t forget to allow only one call to getStatus at a time, see ‘BONUS’ modification above).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 104k
  • Answers 105k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer So..the solution is: SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText =… May 11, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer You are always returning from the loop before it goes… May 11, 2026 at 8:39 pm
  • Editorial Team
    Editorial Team added an answer What are you currently using? I use Axis Wsdl2Java as… May 11, 2026 at 8:39 pm

Related Questions

I need to store my users' name/password somewhere (preferably the Registry) so my .Net
I am supposed to provide my users a really simple way of capturing video
This is my first post on StackOverflow, so please be gentle... I have some
I want to run a web application on php and mysql, using the CakePHP

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.