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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:38:13+00:00 2026-06-15T04:38:13+00:00

I have a javascript string that contains the following: data-href=/Admin/Edit?pk=0001I&rk=50050055 How can I change

  • 0

I have a javascript string that contains the following:

data-href="/Admin/Edit?pk=0001I&rk=50050055"

How can I change this string so the value of rk is changed to a value held in the string newRowKey? Not sure if it helps but the data format always looks like this with the rk followed by an = and then terminated with the “

  • 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-15T04:38:15+00:00Added an answer on June 15, 2026 at 4:38 am
    datahref="/Admin/Edit?pk=0001I&rk=50050055";
    

    to change it if your building the URL

    datahref="/Admin/Edit?pk=0001I&rk="+ newRowKey;
    

    or replace it if you know the existing value

    datahref.replace("50050055", newRowKey);
    

    if you do not know the value of rk, but you know its last in the URL, you could use indexOf to find it.

    datahref = datahref.substring(0,datahref.indexOf("rk=")+3) + newRowKey;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string that contains the following: <form class=form data-action=Create data-entity=Topic data-href=/Admin/Contents/JsonCreate data-rowkey=007H
I have javascript string variable with var sttr=We prefer questions that can be answered
I have a string that contains the following: <span>A</span>BC<span id=blabla>D</span>EF i want to be
Ok, I have the following string I have a string that contains the following:
I have a string variable called selectText that contains the following text: <option value=0101
I have a variable length array of strings declared in javascript that contains Dungeons
Say i have a string that i need to evaluate in javascript such as
I have a JavaScript app that produces a string. I want to transfer this
I currently have a Javascript function that uses a string to reference an object
I have written a javascript function that uses setInterval to manipulate a string every

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.