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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T13:59:41+00:00 2026-06-18T13:59:41+00:00

Hey guys I am trying to get a specific name from a table. Here

  • 0

Hey guys I am trying to get a specific name from a table. Here is my code:

$(document).ready(function () {
    $("#NotesAccessor").click(function () {
      var notes_name = $(this).document.getElementById("#user_table");
      alert(notes_name);
      run();
    });
});

Here is the above this is where I am trying to access the associated username with which table row was click with the #notesAccessor

Table:

 .........
    <td>
        $csvusername
    </td>
.........
    <td>
    ";
      if ($checkNotes[1] == 'No')
    {
        echo "None";
    }
    if ($checkNotes[1] == 'Yes')
    {
            echo "<a href='#' id='NotesAccessor'>Click to access</a>";
    }
    echo "
    </td>
........

My question is – how do I get the $csvusername of the associated NotesAccessor so I can then send this to a dialog in Jquery and open of the notes of that one person I need to get.

Hope this makes sense.

update:

here is full table:

<table class='results'>
    <tr class='firsttr' style='background:gray;'>
        <td>First Name</td>
        <td>Last Name</td>
        <td>Email</td>
        <td>Phone</td>
        <td>Username</td>
        <td>Password</td>
        <td>Status</td>
        <td>Combined Single Limit</td>
        <td>Bodily Injury Each Person</td>
        <td>Bodily Injury Each Accident</td>
        <td>Property Damage</td>
        <td>Address</td>
        <td>Notes</td>
        <td>#</td>
    </tr>"; $j = 0; while ($row = $sth->fetch(PDO::FETCH_ASSOC)) { $val = 1; $csvfirst
    = $row; $csvfirstname = $csvfirst['firstname']; $csvlastname = $csvfirst['lastname'];
    $csvemail = $csvfirst['email']; $csvphone = $csvfirst['phone']; $csvusername
    = $csvfirst['username']; $csvpassword= $csvfirst['password']; $csvstatus
    = $csvfirst['status']; $csvnotes = $csvfirst['notes']; $csl = $csvfirst['Combinedlimit'];
    $bodyinj = $csvfirst['bodyinjur']; $eachacc = $csvfirst['bodyinjureachacc'];
    $propertydmg = $csvfirst['propertydmg']; // Select the current employees
    address $psql = "SELECT MailingAdrs FROM insuranceverificationdisclaimer
    WHERE TraineeUsername =:user"; $psth= $DBH->prepare($psql); $psth->execute(array(':user'
    => $csvusername )); while ($prow = $psth->fetch(PDO::FETCH_ASSOC)) { $pcheck
    = $prow; $address = $pcheck['MailingAdrs']; } if ($csvstatus != "No Longer
    Work Here" && $csvstatus == "Confirmed"){ //check to see if notes exist
    if (empty($csvnotes)) { $checkNotes = 0; } else { $checkNotes = 1; } $memberfirstnamearray[$j]
    = $csvfirstname; $memberlastnamearray[$j] = $csvlastname; $memberemailarray[$j]
    = $csvemail; $memberphonearray[$j] = $csvphone; $membercsl[$j] = $csl;
    $memberbodyinj[$j] = $bodyinj; $membereachacc[$j] = $eachacc; $memberpropertydmg[$j]
    = $propertydmg; $memberstatus[$j] = $csvstatus; $memberaddress[$j] = $address;
    $j++; $i++; echo "
    <tr>
        <td>$csvfirstname</td>
        <td>$csvlastname</td>
        <td>$csvemail</td>
        <td>$csvphone</td>
        <td class='user_table'>$csvusername</td>
        <td>$csvpassword</td>
        <td>$csvstatus</td>
        <td>$csl</td>
        <td>$bodyinj</td>
        <td>$eachacc</td>
        <td>$propertydmg</td>
        <td>$address</td>
        <td>"; if ($checkNotes == 0) { echo "None"; } if ($checkNotes == 1) { echo
            "<a href='#' id='NotesAccessor'>Click to access</a>"; } echo "</td>
        <td>$i</td>
    </tr>"; } }
</table>
  • 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-18T13:59:42+00:00Added an answer on June 18, 2026 at 1:59 pm

    You are mixing pure JavaScript with jQuery, you can solve it as follows.

    First of all, you can put a class to identify the <td> with $csvusername, like class='td_with_csvusername' and then do this:

    $(document).ready(function () {
        $(".NotesAccessor").on("click", function () {
            var td = $(this).parent().parent().find(".td_with_csvusername");
            alert(td.html());
        });
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey Guys I'm trying to get the Railscasts source code from github. when I'm
Hey guys, I'm trying to get Shadowbox to work. Whenever I click the link,
Hey guys i'm trying to use drawString() function to draw the result from a
Hey guys so I'm trying and get the n number of lists from a
Hey guys I can't seem to get the syntax here right, I'm just trying
Hey guys, I am just trying to pull all the records from my database
Hey guys im trying to add to my site some ajax code. I know
Hey guys, here is my code. int main() { char buffer[BUFSIZE]; // define our
Hey guys, I'm trying to compute the cumulative distribution function of the standard normal
Hey guys I've been trying all day to get an ant file to automatically

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.