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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:48:04+00:00 2026-05-24T11:48:04+00:00

I have a page which submits a form on page load and redirects the

  • 0

I have a page which submits a form on page load and redirects the user to another site. The response from the other end can be a bit slow, so I created this page with a fake loading progress indicator to reassure users. For further reassurance I wanted to add a countdown message saying "You should be redirected to X in Y seconds".

I used this jQuery example, which updates an element with id "countdown" with the current number.

{$(function(){
  var count = 7;
  countdown = setInterval(function(){
    $("#countdown").html(count);
    if (count == 0) {
        clearInterval(countdown);
        $('#countdown_container').html("If you seem to be stuck <a href='javascript:the_form.submit();'>click here</a> to try again.");
    }
    count--;
  }, 1000);
});}

I expected that the redirect would happen before the countdown reached 0.
Unfortunately I’ve found that the script actually stops submission of the form until it’s finished running.. Doh! Can anyone suggest any way around this?


A bit later:

Just to clarify after Praveen’s question, I have a normal form on the same page with method post and various hidden inputs containing data to be posted on to another site. In the body tag of my page I have an onload statement submitting this form, like onLoad="document.forms['the_form'].submit()". (I realise that’s probably better done in a jQuery load event.)

  • 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-24T11:48:05+00:00Added an answer on May 24, 2026 at 11:48 am

    You can always submit using $.get or $.post
    Then when the callback is run, you can redirect or do as you like.
    Doing it manually like this gives you more control as to what to do with the data returned
    and if you would like to redirect to a different page after.

    //html    
    <input type="text" name="firstname" value="some text" />
    
    //jquery
    $.get("mypage.php", { firstname: $("input [name=firstname]").first().val() },function(data){
    //redirect, show popup, do as you like since the form has been submitted
    //data contains the results that were printed
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have page which is redirected from htaccess. now I can pass the German
i have a html page in which i enter data which then submits and
I have a page which should show a form with checkboxes, post back if
I have a user control which contains the following code: <form id=CurrencyForm method=post runat=server>
I have a JSP page where I load an arraylist which has the list
I have a form which can contain files and it shows a progress bar
I have designed a registration form which you can see here . It includes
Hi I have a search results page which returns queries form the database using
I have a JSP Page which I am using to redirect to another url
I have small page which has label, DropDownList and a submit button. <div> <asp:label

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.