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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:00:39+00:00 2026-05-29T10:00:39+00:00

I have a js script that would getElementByTagname. Then, i check it childNodes value.If

  • 0

I have a js script that would getElementByTagname. Then, i check it childNodes value.If i use this line of code:

var appname= name[i].childNodes[x].nodeValue;

If the nodeValue is Pang Shinichi (Away from home). The return of the script above became Pang Shinichi (). HTML tag is not being read but instead it was consider as NULL. So, i was thinking if its possible to use childNodes.nodeValue and innerHTML at once.

Any idea on this?

  • 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-05-29T10:00:40+00:00Added an answer on May 29, 2026 at 10:00 am

    This is because your text is spread across several nodes. For a quick solution, use textContent and innerText on the parent node instead:

    var t = "textContent" in document.body ? "textContent" : "innerText",
        appname = name[i][t];
    

    Internet Explorer 8 and lower will use innerText, whilst most other browsers will use textContent. There are slight differences between the behaviour of the two when it comes to white space, but for most use cases the results are identical.

    Working demo: http://jsfiddle.net/7Qsjm/

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

Sidebar

Related Questions

I have a user script that would be much more useful if it could
I have a python script that I would like to add a Shutdown when
I have a list of image paths in my PHP script that I would
I have a script with a factory method that I would like to return
We have a script that generate invoice once a month (cron). But we would
I have a script that is being inserted dynamically via another script. The code
I have this script. I need is so that it only writes the links
I have php scripts that do things like register, login, upload. I would like
I have a script that parses the filenames of TV episodes (show.name.s01e02.avi for example),
I have a script that retrieves objects from a remote server through an Ajax

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.