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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T19:06:00+00:00 2026-06-07T19:06:00+00:00

I am having a button which appends 2 textfields and a button in a

  • 0

I am having a button which appends 2 textfields and a button in a table td, however the problem is that the onclick function of the appended button don’t fire. anyone sees the problem?
code:

<script>
    $(document).ready(function(){
        $("#add").click(function() {
            $(".no_border").append("<br /><label>Co-author email:</label><input type='text' name='author_email'/><label>Co-author Level:</label><input type='text' name='author_level'/><input id='save' type='button'name='save' value='Add'/>");
    });
});
</script>
<?php
    while($row = mysql_fetch_assoc($co_authors)) {
        echo "<tr>
            <td>{$row['author_email']}</td>
            <td>{$row['coauthor_level']}</td>";
            ?><td><button class='remove' id='remove' name='remove' email="<?php echo $row['author_email'] ?>"
            paper="<?php echo $row['paper_id'] ?>">Remove</button></td>
            </tr><?
            ?><td colspan="3" class="no_border"><button class="add" name="add"></button>
            <label id="add" class="cursor_pointer"> Add more co-authors</label></td><?
    }
?>
  • 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-07T19:06:02+00:00Added an answer on June 7, 2026 at 7:06 pm

    You will need to use the jQuery .on() functionality to access elements created after the DOM has loaded.

    More specific info can be found in the jQuery manual here:
    http://api.jquery.com/on/

    $( document ).on( "click", "#add", function() {
        alert("aaaaaaaaaaa");
    } ); 
    

    In jQuery < 1.7 , this was previously used like so:

    $( "#add" ).live( "click", function( e ) {} );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I having some trouble figuring this problem out where I have one button which
stucked with one problem that in my application i have one button which is
The problem im having is that I have a table that when a user
I've an asp.net page having a server side submit button and 2 textboxes which
Im having this code %button.aristo-default.accept{:href => #, :onclick => $.post('/sessions/accept_invite', { user_id: 1, friend_id:
I'm having a problem after adding button on my star rating. Every time when
I am having a table in which i`m dynamically creating and deleting rows. How
I'm having a problem whereby a loop which is instantiating two objects, which in
Is there any possibility of having a button which will execute and action in
I am having a HTML table with 5 rows (say) which is being displayed

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.