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 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

Related Questions

I have a PHP application that currently has 5k users and will keep increasing
I want to let users specify a date that may or may not include
In a game, I'm trying to keep a list of users and have it
I keep getting this error: Result consisted of more than one row I have
I have a table where I keep users numbers and their score user_number |
I currently have two tables similar to users and programs that are linked through
I have a payments table that has a user_id and an amount. Users have
Hi i keep getting the error The multi-part identifier Users.USERS_ID could not be bound
I've got a div that uses overflow:auto to keep the contents inside the div
Our users have created MS-Excel spreadsheets which over time have evolved into fairly complex

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.