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 6173803
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:38:16+00:00 2026-05-23T23:38:16+00:00

It seems there are some very good resources on my question – at least

  • 0

It seems there are some very good resources on my question – at least the basics. But there are still a few dark areas for myself.

First – What I am trying to do.

I am having users “wait” at an intermediary page while I check to see if they have submitted the correct information from another resource (ie. SMS or email) to confirm their subscription to my service. The page should asynchronously check ever couple of seconds to see if they have completed the required steps and their status has been set to ‘1’ or ‘active’ in the database.

Completing the ajax request seems pretty straightforward – the timing however, I am a little thick about.

Also, what is it that I am trying to do with the information I am retrieving – great, so the user has been set to ‘active’ and I can retrieve that value – but then what do I use to redirect them to the final or ‘thank you’ page? Is it a javascript variable that should hold the value then redirect?

Sorry if this seems a little discombobulated, but this is my first try at Ajax & timed refreshes/responses.

  • 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-05-23T23:38:18+00:00Added an answer on May 23, 2026 at 11:38 pm

    I’d do a predefined number of intervals on the ajax call – after 3 attempts, fail with a message:

    var attempts = 0;
    var validation_attempt = setInterval(function(){
        if(attempts > 3)
        {
            clearInterval(validation_attempt);
            $('#my_div').html('No activity, try again later');
            return false;
        }
    
        $.ajax({
            url: '/my_file.php',
            /* other params */
            success:function(data){
                if(data == 'ok')
                {
                    clearInterval(validation_attempt);
                    $('#my_div').html('Your account has been approved');
                }
                else
                {
                    attempts++;
                }
            }
        });
    },3000); // 3 seconds
    

    This should essentially let the user wait for 9 seconds at the most before seeing a “No activity, try again later” message.

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

Sidebar

Related Questions

I am trying to read command lien argument but it seems there is some
Are there some good resources for fixed point math in C#? I've seen things
My app has a registered shutdown function and it seems there's some issues with
Is there some valid purpose to minifying before compressing? It seems highly unlikely that
There seems to be some debate over refactoring to utilize java generics within my
There seems to be some controversy on whether the number of jobs in GNU
I have a survey on a website, and there seems to be some issues
(see attached jsfiddle, screenshots; running browsers on Ubuntu 11.10) There seems to be some
I want to test the phpDocumentor-alpha, and there's a problem that some people seems
I'm looking at implementing an RDBMS. Are there any good resources out there about

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.