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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:50:30+00:00 2026-06-14T18:50:30+00:00

im trying to make loging to web page using ajax. I have this: $.ajax({

  • 0

im trying to make loging to web page using ajax. I have this:

    $.ajax({
       type: "POST",
       url: "ajax/login.php",
       data: dataString,               
       success: function(answer) {
           $('#loging').html(answer);           
       }      
    });

It works fine, BUT: In answer variable is something like this:

    Hi user, <span id="logout_button">Logout</span>

I can see button “Logout”, but my browser dont know here is any span id=”logout_button”. I have code for logout binded with #logout_button but it dosnt work, because my browser knows nothing about this button. When I refresh page, logout works fine.

So, is there any way/function how to say to jQuery “hi buddy, please check for the new elements on document”?

  • 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-14T18:50:32+00:00Added an answer on June 14, 2026 at 6:50 pm

    Yes, you can use .delegate() instead of .bind()

    $('body').delegate('#logout_button', 'click', function() {
        //here the code
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a login page using html, ajax & ASP.NET.The data is
I am trying to make a request to a web page using WebRequest class
I'm trying to make web requests programmatically in ASP.NET, using the POST method. I'd
I am trying to make a Facebook login in my website, I have faced
Yo. I'm trying to make a simple login system in PHP and my problem
I am trying to make a forum. I already have the login and registration
I'm trying to make a form to login users into my webpage using mysql
I am trying to figure out why my web page isn't displaying when using
I am trying to make authorize by using web.config. In my user registration, it
I am trying automate a login process to my web application using Selenium-Python Client

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.