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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:52:38+00:00 2026-06-01T03:52:38+00:00

I have text on a page, its in a <h3> tag, which has a

  • 0

I have text on a page, its in a <h3> tag, which has a class ms-standardheader, but there are other texts on the page with the same class in its own <h3> tag. I also know the text I want to hide is ‘Session’.

With this how can I write a javascript function to hide only this text?

Here is an image of the developtools from IE.

enter image description here

  • 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-01T03:52:39+00:00Added an answer on June 1, 2026 at 3:52 am

    I’d suggest, if you’re restricted (as your tags suggest) to non-library plain JavaScript, the following:

    var h3s = document.getElementsByTagName('h3'),
        classedH3 = [];
    
    for (var i = 0, len = h3s.length; i < len; i++) {
        if (h3s[i].className.indexOf('ms-standardheader') > -1) {
            classedH3.push(h3s[i]);
        }
    }
    
    for (var i = 0, len = classedH3.length; i < len; i++) {
        if (classedH3[i].firstChild.nodeValue == 'the text to hide'){
            classedH3[i].style.display = 'none';
        }
    }​
    

    JS Fiddle demo.

    References:

    • push().
    • document.getElementsByTagName().
    • element.className.
    • node.nodeValue.
    • indexOf().
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which has a rectangular area with text and icons in
I have a page in which there are a few textarea and <input type=text>
I have asp label in my asp page and its text is some my
I have a text area page which is launched from the previous page: $message
I have some text in a non-English/foreign language in my page, but when I
I have a DOMstring object, text of some web page which I get from
I have an object (Ticket), which has a list of other objects (Message). Message
I have a PHP update page in which I am showing a text field
I've setup a partial view which houses its own form tag, like so: <tr>
I have a page which basically loads using ajax, but I want to switch

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.