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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T10:58:23+00:00 2026-06-05T10:58:23+00:00

I have this link on my page – for a find entry by first

  • 0

I have this link on my page – for a find entry by first letter. I want to pass the text of the anchor tag into knockout’s click event inside the data-bind attribute. Is this possible?

<a href="#" data-bind="click: $parent.getManageableEntries()><%= Convert.ToChar(i + 65)%></a></li>

// here's my javascript method in my knockout view model
function ManageEntriesViewModel() {
    var self = this;

    this.getManageableEntries = function(firstLetter) {
        // i want to pass in the text of the <a> tag as the 'firstLetter' variable
    }
}
  • 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-05T10:58:28+00:00Added an answer on June 5, 2026 at 10:58 am

    You should probably have the anchor’s text as an observable in your view model. Then you just need to access that observable (instead of directly accessing the anchor element’s text). This gives you maximum flexibility.

    I made 2 examples because I wasn’t sure how you’re structuring your view model objects.

    Both work fine:
    example-1 ,
    example-2

    If you really want to have the first-letter extraction in your data-bind attribute, you could either put an anonymous function there, or bind your function with an argument, like I did in this fiddle.

    I hope one of these approaches fits your needs.

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

Sidebar

Related Questions

I have this problem with a link in an HTML page where the first
i have this facebook page: LINK And i want to implement multiple facebook like
I have this link: <a id='delete' href='/add/delete.php?iid=XXXXX'>#</a> And I want to pass it on
I have this line below that shows a link to go the next page
This may sound a weird question, I have a page which has a link:
I have this href link with text either attivo or non attivo User can
I have borrowed code from this link PHP regex templating - find all occurrences
I have this link on my page (page1): <a href=@{Controller.action1().secure()}>Link1</a> that takes me to
I have this js that is adjusting the size of the first letter of
I have read this link How can we stop web page view after sign-out

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.