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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:08:31+00:00 2026-06-16T05:08:31+00:00

<a href=?action=add&question=149&cat=88>Answer</a>’ this is the url i needed to get href value i cannot

  • 0
<a href="?action=add&question=149&cat=88">Answer</a>'

this is the url i needed to get href value i cannot use element.getAttribute. I cannot use dom parsing.
But if i try to parse it using search mechanism

td3_element = <td valign="top">
<a href="?action=add&question=149&cat=88">Answer</a>
</td>

href_start = td3_element.search("<a href=") + 8;
td3_part   = td3_element.substring(href_start);
href_end   = td3_part.search(">Answer</a>");
href_element = td3_part.substring(0,href_end);

href_element will only be till `?action=addamp`  

it is taking the

;

character coming after amp as end of line and it is terminating search to that point. Can some one tell me a solution which will give the desired href without using DOM parser

  • 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-16T05:08:32+00:00Added an answer on June 16, 2026 at 5:08 am

    Have you tried a regular expression? I’m not sure what you mean just by ‘search mechanism’.

    For example:

    var htmlString = 'td3...(etc)';
    var regex = /href="([^"])"/;
    var hrefUrl = regex.exec()[1];
    console.log(hrefUrl); //?action=add&question=149&cat=88 
    

    See also this jsfiddle

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

Sidebar

Related Questions

I want to call MVC actions with parameters location.href = '<%: Url.Action(mAction, mControl, new
is it better to do this (regarding performance, not readability...): $('a.updateCartButton').click(function() { $('form[name=updateCartForm]').attr('action', $(this).attr('href')
I am currently fighting Google Chrome on the following action: location.href = url location.replace(url)
jqGrid $(document).ready(function () { $(#grid).jqGrid({ url: '@Url.Action(GetAllAuthors, Admin)', datatype: json, mtype: 'get', colNames: ['Yazar
$(.blok).newWindow({ windowTitle:Example1, ajaxURL:Action.php?task=BlokDuzenleFormGetirBlokId=+$(.blok).attr('id') }); when first clicked on blok class a href, newWindow loads
I have an <a id=javascriptlink> tag, without href. Its action handled by jquery onclick.
jQuery hyperlinks - href value? text][1] I am running in to a problem using
My issue is that I cannot get my tabs to show my data using
I have some html to popup a jQuery UI modal: <a href=my/url class=popup>Click me</a>
I am trying to add a link to the text elements of this D3

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.