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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T22:20:21+00:00 2026-06-14T22:20:21+00:00

I have an input that checks the password after each character entered. this adds

  • 0

I have an input that checks the password after each character entered. this adds the POST check on each key up.

When the password check is confirmed, a submit button is enabled and when you click this button it sends details to php via ajax. But its actually firing the same amount of times as the key up check. Is there a way to limit to fire only once? if I have 6 characters in my password, then its 6 times the keyup check is done and 6 times the click update fires.

Keyup Password Check

$('input[name=currentpassword]').keyup(function(){
    var currentcheck = $(this).val();
    var dataString='thisConfirm='+ currentcheck +'&userid='+$('input[name=userid]').val();
    setTimeout(function(){
        PasswordChecking =  $.ajax({
                                type:"POST",
                                url:"/assets/inc/password-check.php",
                                data:dataString,
                                dataType:'html',
                                context:document.body,
                                global:false,
                                async:true,
                                success:function(data){
                                    //return data
                                    var PasswordChecking="1";
                                    console.log(PasswordChecking);
                                    console.log("here you would decide on data for valiadation success");
                                    checkconfirms(emailconfirm, passconfirm, PasswordChecking);

                                }
                            }).responseText;
    }, 1000);

});

jQuery Update Button which sits inside checkconfirms function

$('input[name=updatedetails]').click(function(){
                    var newEmailValue = $('input[name=newemailconfirm]').val();
                    var accountID   =   $('input[name=userid]').val();              
                    var dataString='email='+ newEmailValue +'&userid='+accountID;
                    $.ajax({
                            type:"POST",
                            url:"/assets/inc/user-change-email.php",
                            data:dataString,
                            dataType:'html',
                            context:document.body,
                            global:false,
                            async:false,
                            success:function(data){
                                var overlay = $("<div/>").addClass("overlay");
                                var logindialog = $("<div/>").addClass("popup-login");
                                $("body").append(overlay);
                                $("body").append(logindialog);
                                $(".popup-login").prepend('<p><label for="email">Email</label><input type="text" name="reloginemail" id="email"></p><p><label for="password">Password</label><input type="password" name="reloginpass" id="password"></p><input type="button" name="relogindude" value="sign in">');
                                $(".overlay").fadeIn();
                                $(".popup-login").fadeIn();
                                // Once the pop up is created this enable the click function which will enable the ajax form check.
                                $('input[name=relogindude]').click(function(){
                                    var email = $('input[name=reloginemail]').val();
                                    var password = $('input[name=reloginpass]').val();              
                                    var dataStringed='newemail='+ email +'&newpassword='+password;
                                    $.ajax({
                                        type:"POST",
                                        url:"/assets/inc/login.php",
                                        data:dataStringed,
                                        success:function(data){
                                            window.location.reload();
                                        }
                                    });
                                });//End relogindude click function
                            }
                    });//End updatedetails click function
  • 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-14T22:20:22+00:00Added an answer on June 14, 2026 at 10:20 pm

    Try this, clearing timeout for limiting number of requests:

    var timeout;
    $('input[name=currentpassword]').keyup(function(){
        var currentcheck = $(this).val();
        var dataString='thisConfirm='+ currentcheck +'&userid='+$('input[name=userid]').val();
        if(typeof timeout != 'undefined') clearTimeout(timeout);
        timeout = setTimeout(function(){
            PasswordChecking =  $.ajax({
                                    type:"POST",
                                    url:"/assets/inc/password-check.php",
                                    data:dataString,
                                    dataType:'html',
                                    context:document.body,
                                    global:false,
                                    async:true,
                                    success:function(data){
                                        //return data
                                        var PasswordChecking="1";
                                        console.log(PasswordChecking);
                                        console.log("here you would decide on data for valiadation success");
                                        checkconfirms(emailconfirm, passconfirm, PasswordChecking);
    
                                    }
                                }).responseText;
        }, 1000);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a log function on my admin panel that checks user input for
I have the following code that checks for both the username and password but
I have 5 functions that check user input against regular expressions...these regular expressions have
I have a user controller that checks to login a user. It has this
For web sites that have username/password text input fields, the browser usually handily offers
I have a query that checks a database for a match against the input
I have this simple problem that gets an input from the user using a
I have an input that holds a date value like so 03/15/2012 I am
I'm trying to build something on javascript that I can have an input that
I have a number input that should trigger jQuery on every change. To do

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.