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

  • Home
  • SEARCH
  • 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 6172713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:26:27+00:00 2026-05-23T23:26:27+00:00

Problem: New Inserted Dom elements aren’t been wired correctly, function deletepost not firing. This

  • 0

Problem: New Inserted Dom elements aren’t been wired correctly, function deletepost not firing. This happens only on IE and for new elements only added to DOM.

$(function(){
        $('#postentry').submit(function() {
          var tyu = $('#tittle_ent').val();
          if(tyu.length <= 2)
            {alert('Enter More Text!'); return false;}else
            {
                $.ajax({
                    type:'post',
                    url: '/posts_in.php',
                    dataType: "json",
                    data: $("#postentry").serialize(),
                    success:function(data){
                        var tittle = data[0];
                        var id= data[1];                        
                        $('<div></div>').attr('id','post'+id).addClass('boxee').html(tittle).prependTo('#boxer');                        
                        $('<img src="img/page-text-delete-icon.png" name="'+id+'">').attr({id:'postchk'+id,onclick: 'deletepost(this.name);'}).appendTo('#post'+id);                        
                        $('#tittle_ent').val('').focus();

                    }
                });
                return false;
            }
        });
    });
  • 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-23T23:26:27+00:00Added an answer on May 23, 2026 at 11:26 pm

    Use jquery live

    $(function(){
            $("#boxer img").live("click", function(){
              deletepost($(this).attr("name"));
            });
    
            $('#postentry').submit(function() {
              var tyu = $('#tittle_ent').val();
              if(tyu.length <= 2)
                {alert('Enter More Text!'); return false;}else
                {
                    $.ajax({
                        type:'post',
                        url: '/posts_in.php',
                        dataType: "json",
                        data: $("#postentry").serialize(),
                        success:function(data){
                            var tittle = data[0];
                            var id= data[1];                        
                            $('<div></div>').attr('id','post'+id).addClass('boxee').html(tittle).prependTo('#boxer');                        
                            $('<img src="img/page-text-delete-icon.png" name="'+id+'">').attr({id:'postchk'+id,onclick: 'deletepost(this.name);'}).appendTo('#post'+id);                        
                            $('#tittle_ent').val('').focus();
    
                        }
                    });
                    return false;
                }
            });
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having this problem on a new cruisecontrol.net install running on Windows Server 2003
being new to WPF this is a complex problem for me. What i want
I'm new in using boost and have a problem. I need shared_mutex function in
Inserted new menu item in hook_menu. But the menu item is not reflected. So
Doing the below will reproduce my problem: New WPF Project Add ListView Name the
New problem with VS2005 Team Build: Building locally a solution of a mobile client
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
New day, new problem :-) Code: Client Side: void abw_Closed(object sender, EventArgs e) {
Following on from my previous question [link text][1] , I have a new problem.
I'm new to python and have hit a problem with an SQL query I'm

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.