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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:36:51+00:00 2026-05-23T16:36:51+00:00

I have this snippet of code, which fails at var link: var obj =

  • 0

I have this snippet of code, which fails at var link:

var obj = $(this[0]);     
var html = obj.html();
var link = html.find('a[href*=/comment/reply]');

This is an ajax response from a submitted form. The output of what I get back from the var html is as follows:

===><div class="comment-new-success"><a id="new"></a>
<a id="comment-482"></a>
<div class="comment">
<div class="submitted">Submitted by <a href="/user/1" title="View user profile.">NAME</a> on Sun, 07/10/2011 - 12:48.<span class="new"> *new</span></div>
<div class="content clearfix"><p>123123123123122</p>
</div>
<div class="links_box"><ul class="links"><li class="comment_delete first"><a href="/comment/delete/482?token=e1fba5ef1c99c5a3760313b53f582972">delete</a></li>
<li class="comment_edit"><a href="/comment/edit/482">edit</a></li>
<li class="comment_reply last"><a href="/comment/reply/6/482">reply</a></li>
</ul></div></div>
</div><===(string)

How do I properly get the “/comment/reply/6/482” variable as the var link in the above example. The code (I thought) should work fine, but doesn’t

  • 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-23T16:36:51+00:00Added an answer on May 23, 2026 at 4:36 pm

    The answer was this:

    var link = $(this[0]).find('.comment_reply a').attr('href');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following javascript snippet, which fails to load due to a missing
In my views.py, i have a snippit of code like this: def clean_post_data(form): for
I have this code in jQuery, that I want to reimplement with the prototype
I have this RewriteRule that works too well :-) RewriteRule ^([^/]*)/$ /script.html?id=$1 [L] The
I have a snippet of code, simply trying to execute a script on a
Here's a snippet of code from a shell script I have written: for src
I have this idea for a free backup application. The largest problem I need
I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM
I have this line in a javascript block in a page: res = foo('<%=
I have this setup where in my development copy I can commit changes on

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.