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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:20:58+00:00 2026-06-08T14:20:58+00:00

My setTimeout seems to be working for logging in, but not for submitting data.

  • 0

My setTimeout seems to be working for logging in, but not for submitting data. :

<script type="text/javascript" src="../scripts/jquery.js"></script>
<script type="text/javascript">

$.ajaxSetup({async:false});

function Validate_submit(form) {
    var Address1_input = form.address1.value;
    var Address2_input = form.address2.value;
    var City_input = form.city.value;
    var State_input = form.state.value;


    $.post('../scripts/submit_check.php', {address1php: Address1_input, address2php: Address2_input, cityphp: City_input, statephp: State_input}, 
    function(output) {
            $('#submit_msg').html(output).fadeIn(500);
            if (output == 'Submitting...') {
        var timeoutID = window.setTimeout(function () {location.reload();}, 1000);
            } else {
                $('#submit_msg').html('something went wrong').fadeIn(500);
            }
        }
        );

}

The same code works in my log-in popup window:

<script type="text/javascript" src="../scripts/jquery.js"></script>
<script type="text/javascript">
$.ajaxSetup({async:false}); 

function Validate_login(form) {
    var Email_input = form.email.value;
    var Password_input = form.password.value;
    var Rememberme_input = form.remember_me.checked;

    $.post('../scripts/login_check.php', { emailphp: Email_input, passwordphp: Password_input, rememberphp: Rememberme_input},
        function(output) {
            $('#login_msg').html(output).fadeIn(500);
            if (output == 'Logging in...') {

                var timeoutID = window.setTimeout(function () {location.reload();}, 1000);
            }
        }
        );  
}

When I click the submit button in the submit form, it shows ‘Submitting…’ for a split second, but not for the whole second (like in the login-popup). Can someone help me?

  • 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-08T14:20:59+00:00Added an answer on June 8, 2026 at 2:20 pm

    You’ll probably need to cancel the actual <form>‘s submission. return false from the onsubmit handler after you call Validate_submit.

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

Sidebar

Related Questions

Possible Duplicate: javascript: pause setTimeout(); Im using jQuery and working on a notification system
I am using setTimeout to create animation in Javascript, but it does not seem
I am using setTimeout for getting new data at interval of 30 seconds, but
So, in javascript since it's event-driven by its nature it seems that setTimeout doesn't
I am working with JavaScript and jQuery in an UIWevView on iOS. I'v added
I'm pretty new with Javascript and jQuery and can't quite figure out settimeout .
I'm working on a script to rotate/cycle through images in javascript while respecting a
Working on some javascript exercises for class but running into two problems. I can't
setTimeout(target.mousedown, 200) doesn't seem to work. I can do setTimeout(target.mousedown(), 200) , but this
Alright, I thought I had this whole setTimeout thing perfect but I seem to

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.