Avatar of sayitfast
sayitfast asked on

Replace href text ...> thisText</a>

I have a filed on a SharePoint site that pulls information from a list... I need to replace the text that appears in the href tag on the actual web page.

<div class="heading_title">Title Text Here
<span class="heading_subTitle">
<A HREF="/DispForm.aspxID=1&RootFolder=*">ReplaceMe</A>

I need to remove the text "ReplaceMe" and put in an empty string or blank text.

Any help is appreciated.
Scripting LanguagesJavaScript

Avatar of undefined
Last Comment

8/22/2022 - Mon

I'm not sure I'm understanding exactly what you want to do... not putting any text in there would mean that there wasn't anything to click, but to have no text in it, you just do this:
<div class="heading_title">Title Text Here
<span class="heading_subTitle">
<A HREF="/DispForm.aspxID=1&RootFolder=*"></A>

Open in new window


I need to remove the text that exists and then replace that with a empty string.

This would be on page load... Its a strange use case but this what I have to do.

I will be looking for specific text and replace that instance with an empty string. if the text is not the specific text I am looking for then it will stay unchanged.

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes