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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:28:31+00:00 2026-06-18T06:28:31+00:00

Hi I am having a trouble in getting href attribute of an a link

  • 0

Hi I am having a trouble in getting href attribute of an a link within the table.

<table border="1" align="center" width="90%" id="choose-address-table">
<tr><td>Header</td><td> Effective Date</td><td> Header</td></tr>
<tr><td><ul><li><a href="http://www.google.com" target="_blank">Text (1)</a></li></ul></td><td>01-01-2013</td> <td> <input type="button" class="SelectorButton"  name="Request Print" value="Request Print"/></td></tr></tabl>

JS

$(".use-address").click(function () {

         var link = $(this).parent().siblings(":first").children().children();
         var link1 = $(this).find('a'); alert(link1.attr('href'));
         //             alert(link.html());
         //             alert(link.text());
  • 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-18T06:28:32+00:00Added an answer on June 18, 2026 at 6:28 am

    Nothing in your posted markup has the class use-address. Assuming you are trying to select the table:

    $('#choose-address-table').click( function() {
        var link1 = $(this).find('a');
        alert(link1.attr('href')); // alerts correct value
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having trouble in getting the exact value of href only. Here is the
Im having trouble getting a function within a function working, do you think what
I'm having trouble getting the correct scope within prototype's Ajax.Request class. What I'm trying
I'm having a bit of trouble getting a script to work within a CMS.
im having trouble getting a popup using javascript to show table data onmouseover when
I am having trouble getting the text to center inside of a list item.
having trouble getting multiple lines to work correctly in a mailto link In my
im having trouble getting a string (containing a URL) from one activity to another.
Im having trouble getting my JTable that im using to display either check boxes
I'm having trouble getting the CanExecute method of my command to work property. I've

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.