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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T11:11:31+00:00 2026-05-28T11:11:31+00:00

Guys i am facing a problem with wildcard character in jquery. Please help if

  • 0

Guys i am facing a problem with wildcard character in jquery. Please help if possible.

I am using jQuery like function for binding a click to an id eg. proceed_10,proceed_11. Now if i click on proceed_10 for first time everything works fine. But if i click on an image with id as proceed_10 again then it executes twice.Then if i click on some other proceed image with id proceed_5 it executes thrice. Here is a minor code snippet to review :

$("[id*='applybut_']").live('click',function(){ 

        var idfinder = null; var currid = null;
        idfinder = $(this).attr('id').split('_');
        currid = idfinder[1];
        $.ajax({
            url: "someurl",   
            type: 'POST',
            dataType: 'json',
            data: {},
            error: function(data){ },
            success: function(data){
                if(data.success == true)
                {
                    messyhtml+= '<img src="'+proceedimgsrc+'" id="proceed_'+currid+'" style="cursor:pointer;">';
                    $("[id*='proceed_']").live('click',function(){
                        var foostr = $(this).attr('id').split('_');
                        var fooid = foostr[1];
                        var barid = $('input[name="bar_id"]:checked').val();
                            if(fooid != '' && barid != '')      //This loops executes twice,thrice, and so on...
                            {
                                $.ajax({
                                    url: "someurl",   
                                    type: 'POST',
                                    dataType: 'json',
                                    data: {'fooid':fooid,'barid':barid},
                                    error: function(data){ },
                                    success: function(data){
                                        if(data.success == true) {
                                            //
                                        } else if(data.success == false) {
                                            //
                                        }
                                    }
                                }); 
                            }                               

                    });
                    $(".popcontainer").html(messyhtml);
                }
            }
        });
    });
  • 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-28T11:11:32+00:00Added an answer on May 28, 2026 at 11:11 am

    The line which reads…

    $("[id*='proceed_']").live('click',function(){
    

    …is being executed each time a click is made as it’s embedded within the event handler for…

    $("[id*='applybut_']").live('click',function(){ 
    

    The upshot of this is that you are subscribing multiple (identical) handlers to all proceed_* items – one each time an apply_but_* is clicked. Hence your behaviour.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi guys I am using entity framework, I am facing some problem while checking
hey guys, i love the jquery toggle function. however currently i'm facing a little
Wanted some help with a problem with mapkit I am facing. Should be a
I am facing one problem in Tapestry. Problem - I am using a grid
Guys, I've came across this problem I can't resolve myselg, I'm pretty sure I
Guys, I am using SQL Server 2000 and executing the sp_columns stored procedure to
Guys, what is function called after my class loaded, where i can call self
guys which text editor is good for Rubyonrails? i m using Windows and i
guys please post me an example for threading in MFC....it should show the progress
I am facing with problem related Http Connection. MY code : URL url =

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.