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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:25:03+00:00 2026-05-25T11:25:03+00:00

Hy, I have a live username validation using ajax : <td id=user_process_live><input type=text id=user_live_ver

  • 0

Hy,

I have a live username validation using ajax :

<td id="user_process_live"><input type="text" id="user_live_ver" name="user" /></td>

abnd the following java :

  $("input#user_live_ver").blur(function() {
    var username=$(this).val();
    var dataString = 'username=' + username;
    $.ajax({
        type: "POST",
        url: "ajax/login_ajax.php",
        data: dataString,
        cache: false,
        success: function(html) {
           $("td#user_process_live").html(html); 
        }

        });
    });

The login_ajax.php returns the same <input type=text id=user_live_ver name=user /> but with different styles applied (background-color and border-color) : red if username already exist and green if user does not exist …

The problem is the script does this just one time .. just one .blur() …

If i remove the .ajax({ ... etc }); and insert alert(dataString); every time i click out that input the alert() is triggered but not the same for the .ajax() …

What seems to be the problem ? Thanks a lot

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

    The problem is that you are replacing the input after the first ajax request returns so your blur event isn’t bound anymore. Try using delegate to bind your event:

    var process_live = $("#user_process_live");
    process_live.delegate("#user_live_ver", "blur", function() {
        var username = $(this).val(),
            dataString = {'username': username};
        $.ajax({
            type: "POST",
            url: "ajax/login_ajax.php",
            data: dataString,
            cache: false,
            success: function(html) {
               process_live.html(html); 
            }
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am loading content into a page with ajax that will have live click
O, so i have a 'live search' ajax search, which currently runs an sql
I have User table in my DB. A user has the fields name, company_id
Let's say you have a class called Customer, which contains the following fields: UserName
I have an user table like this:- guid | username | password | firstname
In my application I have a login using ajax that returns a JSON result.
I have the following method which allows a user to login into my application:
We have a live MySQL database that is 99% INSERTs, around 100 per second.
I have a live search on my help page that searches our help database
I have a live database that had some data deleted from it and I

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.