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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:50:18+00:00 2026-05-11T22:50:18+00:00

how do i bring the tr value into .click event? i want to be

  • 0

how do i bring the tr value into .click event?
i want to be able to pass the tr id into updatedb.php as well- for sql updating

enter

<head>
<script src="jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="jquery.jeditable.mini.js" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function() {

var global= ""

$('.click').click(function() {
    var $this = $(this);
    var $tr = $this.closest('tr');

alert($tr.attr('id'));
global= $tr.attr('id');

});


    $('.click').editable('updatedb.php?test=123', { 
        indicator : "<img src='indicator.gif'>",
        tooltip   : "Click to edit...",
        onblur : 'submit',
        style  : "inherit"

    });


    });

</script>

</head>
<body>      
    <tr id=1>
    <td>
        <span class="click" style="display: inline">Funny click here testing!</span>
        <br />
        </td>    
    </tr>
    <tr id=2>
        <td>    
        <span class="click" style="display: inline">Second inline!</span>
        </td>
    <tr>    
</body>
</html>

here

Hi, jeditable don’t have successor. I finally manage to get the value into global. But now facing another issue. Jeditable doesn’t allow me to pass in extra value…

I tried
editable(‘updatedb.php?test=123’
then echo “START” . $_POST[‘test’] . “END”

I also tried other way, not working.

  • 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-11T22:50:18+00:00Added an answer on May 11, 2026 at 10:50 pm

    You may want to check out the jQuery plugin jEditable, the successor to editable.
    Link: http://www.appelsiini.net/projects/jeditable

    Back to your question, you can get the id of the TR node in your example by asking for the attribute using either parent(), closest() or parents(). I’d recommend against parent() because it expects you to leave the HTML nested exactly like in your example. Better to use parents() or closest() with a filter.

    $(document).ready(function() {
        $('.click').each(function() {
            var $this = $(this);
            var $tr = $this.closest('tr');
            // Do stuff with $tr like checking it, extracting $tr.attr('id') ...
            $this.editable('updatedb.php', {
                indicator : "",
                tooltip : "Click to edit...",
                onblur : 'submit',
                style : "inherit"
            });
        });
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Alright so I want my users to be able to click a link that
I want to bring up a file dialog in Java that defaults to the
I'm trying to bring a legacy C# .NET 1.1 application into the modern era.
In SQL Server how do you query a database to bring back all the
I'm trying to delegate a click event to a TR element that contains a
How can I bring a console application window to front in C# (especially when
I'm trying to bring myself up to speed on C#, having never developed for
Is there a shortcut key to bring up the call hierarchy of a method
I been waiting for sometime now to bring my Asp.net Preview 4 project up
What would be the best way to bring people back to their first love,

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.