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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:38:14+00:00 2026-05-27T19:38:14+00:00

Please check the codes.. $(.editable).live(click,function(){ CurrentOBJhtml = $(this).text(); nextHtml = <input type=’text’ class=’hoverable’ value=’+CurrentOBJhtml+’

  • 0

Please check the codes..

$(".editable").live("click",function(){
CurrentOBJhtml = $(this).text();
nextHtml = "<input type='text' class='hoverable' value='"+CurrentOBJhtml+"'  />";
var c = nextHtml;
alert(c); //here two alert box comes....
$(this).html(c);

});

When i alert c ,it alerting two values in two alert boxes…

first value is <input type='text' value='myname' class='hoverable' />
second one is <input type='text' value='' class='hoverable' /> where the second one doesnt have the value .

When i comment the last line ($(this).html(c);) then it only giving the first result.

What is the problem with me ? i am totally confused.

please help me to solve this issue.

Thank you .

Update :

HTML :

  <fieldset id="user_info_module">
<label>username:</label>
<label class="editable" id="user_info_username">
<label>Email:</label>
<label id="user_info_email"> </label>
<label>Default page:</label>
<label id="user_info_defaultpage"></label>
<label>mobile:</label><label id="user_info_mobile"></label>
<label>country:</label><label id="user_info_country"></label>
<label>address:</label><label id="user_info_address"></label>
<label>pincode:</label><label id="user_info_pincode"></label>
<label>landline:</label><label id="user_info_landline"></label>
</fieldset>

http://jsfiddle.net/M3J2p/1/

  • 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-27T19:38:14+00:00Added an answer on May 27, 2026 at 7:38 pm

    First thing put your jquery code inside the $(document).ready(function()); handler.

    and check this jsfiddle, it is not showing any double alert box to me. when you click a element then this will refer to that particular element not the others.

    Update your html code in question to confirm about the exact problem or create a example jsfiddle for your problem.

    Edit: Error reasons and solved

    Before jQuery 1.7, to stop further handlers from executing after one
    bound using .live(), the handler must return false. Calling
    .stopPropagation() will not accomplish this.

    $("a").live("click", function(event){
      event.preventDefault();
    });
    

    Check your updated jsfiddle as per your code. you have missed to close the one tag and the above event bubbling problem occurs when you use this. In updated jquery use .on() ..

    check .live() documentation at jQuery to konw about this better.

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

Sidebar

Related Questions

Please check this code out it compiles and runs absolutely fine.. The question is
Please check my HTML below: <table cellpadding=0 cellpadding=0 border=0> <tr> <td> <div class=toogler>Demo1</div> </td>
Please check this: http://img62.imageshack.us/img62/3598/ieff.png why is it more height than in FF.. i want
Please check out: http://gherkin.co.nz/refresh/ and click on the purple box that says 'Membership chest'
I have created a DeclarativeServiceLibrary using VS2010 beta 2, Please check this image of
guys please check my codes in displaying record.. <?php include(db.php); $username=$_POST['username']; $email=$_POST['email']; $query=SELECT *
How can i upload a file? Stackoverflow i cant page codes so please check
guys, i have these codes for updating the records in the database. please.. check
Check this error and please help me. 2009-07-24 15:58:34.209 LBS[2636] Host 'staging.common.virtualearth.net' not found
I've codes below: (Please check out codes below on Google Chrome 8+) codes 1:

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.