Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
80 views

<span class="SpellingError SCXO166867203 BCX8" style="margin:0px;padding:0px;background-repeat:repeat-x;background-position:left bottom;">bv</span><span class="...
Retroshift's user avatar
0 votes
1 answer
256 views

I've stumbled upon a technical test in which i have to count occurrences of words inside an HTML body. I have to avoid script tags and comments, these are the unique conditions from the problematic. ...
Steviggio's user avatar
-1 votes
1 answer
62 views

I have html file <div>1. <span id="el1"> hello </span> world</div> <div> <span id="el2"> first part</span> <span ...
dio's user avatar
  • 5
0 votes
3 answers
1k views

I am new to XPath and trying to capture the values "Time: " and "13:45" from the following HTML snippet. Any help or suggestion will be really useful. Thank you! <div class=&...
Anaras's user avatar
  • 1
0 votes
1 answer
185 views

I'm not an expert coder but have this error in my Netlify Account where I am trying to update code and such and keep getting this error on my builds. The error is : GraphQLError: Field "...
ironcove's user avatar
0 votes
0 answers
23 views

Working code here is mixed with non-working code. The code works up until the line where it commands the innerText to be of x.innerHTML.substring(3,-3) This is the function I am calling on a click ...
Anthony Pulse's user avatar
0 votes
1 answer
2k views

I am trying to create a simple "Shopping List" whereby the user types in the name of the items and then click the "add to List" button to add the items to the list, which it will ...
zach's user avatar
  • 37
0 votes
1 answer
471 views

i have following code: const x = document.createTextNode('Helloooo') document.body.insertAdjacentText('beforebegin', x) and after execution i see something like [object Text]. My question is how do ...
Mr. CC's user avatar
  • 244
1 vote
2 answers
267 views

I'm trying to scrape some information from a website using Selenium and Python and sometimes there's texts like this HZS stonks remaining... that does not have any name or label that I can get the ...
ShiroTheShiro's user avatar
1 vote
1 answer
535 views

I am using MutationObserver to track character changes in my rich text editor. Everytime a text is edited, the mutation callback method is called with the list of mutation records. The mutation target ...
Saurabh Kulkarni's user avatar
0 votes
2 answers
644 views

I am trying to find cases using Xpath/Selenium where there is no white-space before the hyperlink. e.g. <p>Click on this<a href="#">link</a>to access the data</p>` ...
sarbjit's user avatar
  • 3,965
1 vote
1 answer
206 views

I need to extract the xpath for the number 152. The xpath that I created extracts the text after 152 which is "Test" but excludes the number 152. I need to get this count. I am using below ...
Nilesh Ambestha's user avatar
2 votes
1 answer
988 views

we can assign the input value to a variable and then we're assingning that variable to an element's innerHTML, likewise why can't I insert text object into an element's innerHTML?? eg code: x = ...
user avatar
2 votes
2 answers
142 views

How to access text in a website using Java Selenium? HTML snapshot: Can someone explain to me how to access the demouser and email id using java selenium in the above picture https://phptravels.com/...
venkatesh konidala's user avatar
0 votes
0 answers
156 views

Need to process text inside uncertain layers of nested nodes using following function: function processTextNodesIn(elem) { if (elem) { for (var nodes = elem.childNodes, i = nodes.length; i--;) { ...
Daolin's user avatar
  • 644
1 vote
2 answers
1k views

i'm learning HTML, and it is not clear yet to me what is the difference in using a text node or a <p> element. more precisely, what are the advantages and disavantages of using a <p> ...
gdor11's user avatar
  • 193
0 votes
1 answer
407 views

I am very new to the community and forgive me if I misword things but! I'm currently working on an text adventure game and I was wondering if it was possible to add pictures to specific choices. I ...
dangerdan's user avatar
2 votes
1 answer
3k views

Suppose I have <div id="mydiv"> <span>foo</span> <span>bar</span> bob </div> Is there a JavaScript function/property which will return &...
Codemonkey's user avatar
  • 4,909
2 votes
1 answer
358 views

according to Text element document in MDN Value of Attr Node Can be of type Text element. The Text interface represents the textual content of Element or Attr. But how can i set value of a DOM ...
Ali Qamsari's user avatar
0 votes
0 answers
44 views

I am using custom templates with django.contrib.auth.urls and I've noticed that in the top left corner I have plain text appearing that isn't part of my template e.g. "Password Reset" on the ...
Chris's user avatar
  • 193
0 votes
3 answers
418 views

So I'm still learning javascript and for my first to do list project I've gotten to the point where I can add the array to the HTML page but instead of taking the last element and adding it it adds ...
scorpio's user avatar
  • 61
0 votes
2 answers
2k views

I'm trying to add lines to my page using javascript. I'm eventually planning on generating ascii art from it, but that's besides the point. For some reason, the text |&nbsp;&nbsp;&nbsp;&...
import huh's user avatar
0 votes
1 answer
151 views

<div class="col_5"> <br> <i class="phone"> :: Before </i> 0212 / 897645 <br> ...
omneer's user avatar
  • 93
0 votes
2 answers
828 views

I found the answer. Insert HTML element two (or more) times using JavaScript But I need in depth knowledge about this. How does this happened without for loop or cloning? let strong = document....
Tamerlan's user avatar
  • 119
1 vote
1 answer
422 views

Markdown-like functionality for tooltips Problem: Using Vanilla JavaScript I want to: Change this: <div> <p> Hello [world]{big round planet we live on}, how is it [going]{verb ...
Hvitis's user avatar
  • 540
0 votes
2 answers
51 views

I am trying to solve this question from w3 resources. QUESTION: Write a JavaScript program to find 1st January is being a Sunday between 2014 and 2050. I tried solving it and attached the code below....
Mahdee Shomoy's user avatar
1 vote
0 answers
56 views

Using MarkJS, I run into this issue that the last word in the text often does not get highlighted. This happens when I'm using contenteditable div but I'm unsure how or when exactly this happens. See ...
Omer S's user avatar
  • 81
1 vote
1 answer
68 views

I have an array with a number of paragraphs which are to be placed inside a container until that container is »full«. Whatever does not fit into this container is to be placed into a separate ...
JoSch's user avatar
  • 992
0 votes
2 answers
137 views

I would like the output to look like this: stephen peter ben but with the 'e' characters having a background colour. Is this possible using the below code and some javascript? <!DOCTYPE html>...
Steve's user avatar
  • 665
10 votes
1 answer
5k views

If you write below code: const e = document.body.firstChild; if (e.nodeType === Node.TEXT_NODE) console.log(e.data); You will get this error on e.data: TS2339: Property 'data' does not exist on ...
Mir-Ismaili's user avatar
  • 17.7k
1 vote
2 answers
855 views

Cheerio does not like html without proper tags (who does, really?). I'm trying to scrape some menus and the content i want is between elements in the html. Is there a way to parse each of these and ...
herr_hest's user avatar
0 votes
0 answers
396 views

The goal is to collect all text nodes that are direct or indirect ancestors of the body element that meet certain criteria. The problem is that collecting nodes via the method nextNode of a ...
user1521685's user avatar
4 votes
0 answers
174 views

Trying to reduce the amount of DOM nodes I did some research on this, but have not found any comparing numbers, like is it better to use two DOM elements instead of two pseudo-elements or is it better ...
extempl's user avatar
  • 3,147
0 votes
1 answer
258 views

So I'm trying to get the span node in the html below using xpath, and the only things I want to be used in the xpath are the text node "follower" and the span node itself, not any other nodes. &...
Farzad's user avatar
  • 13
-1 votes
1 answer
401 views

Generally if there is text between tags in HTML, it becomes a text node. However, this is not always the case. Consider this example: <p> <a href="hello.html">hello</a> <a href=...
Lev's user avatar
  • 6,687
0 votes
2 answers
1k views

If i apply the following xslt <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes"/> <xsl:template ...
flyingaxel's user avatar
1 vote
4 answers
2k views

I have a form with lots of input elements and there's nothing telling the user which fields are required. The problem is that I don't have access to its HTML code. So I'm writing this JavaScript: ...
Marcos Antonio's user avatar
1 vote
1 answer
112 views

When merging 3 text nodes in 3 different paragraphs, the first two ps don't merge in one of the text nodes. It should concatenate the name Robert in between two other text nodes. It only works on the ...
cDub's user avatar
  • 518
-1 votes
1 answer
560 views

I am parsing a website and I get an element like this <td> <span class="label">Hometown/High School:</span> " ...
Tripti Rawat's user avatar
3 votes
1 answer
293 views

I'm trying to get a textnode with new lines in it (my text contains \n and x0a). I found the way to do this, using white-space: pre, and it works, but the problem is that the content doesn't fit to ...
chrigu's user avatar
  • 55
0 votes
2 answers
1k views

When we parse an XML document like <entry> Sometext </entry> using Javax.xml.Parsers.DocumentBuilder, we can always get the text node by Document doc = ... Node entry = doc....
Dickens LI's user avatar
-2 votes
1 answer
106 views

The following code, included in the header of a website, contains errors. I think the intention is clear by the code, but that it contains syntactical and/or other errors? Please correct. Edit 2: ...
ptrcao's user avatar
  • 423
4 votes
2 answers
3k views

I want to parse this with Jsoup (this is a simplification, I would be parsing entire web pages) <html><body><p>A<strong>B</strong>C<strong>D</strong>E</p&...
Marcos Fernandez's user avatar
0 votes
1 answer
482 views

I am trying to add a new element to the parent of a text node, however all my attempts are not working. I want to extract some text from a text node and convert it into a <a> tag, then add that ...
Samuel Hawksby-Robinson's user avatar
1 vote
2 answers
355 views

I'm a bit rusty on my jQuery (been a few years!) I have to assume this has been asked 100 times but I'm not searching for the right terms it seems. I'm trying to grab all of the descendant text nodes ...
DA.'s user avatar
  • 40.8k
1 vote
1 answer
1k views

I need to find a specific text value within a document,'method'and for each instance replace that text value 'method' with the following: element to replace method This 'method' value can appear ...
user avatar
0 votes
0 answers
748 views

The snip of code below comes from a very large document with all types of tags. I can extract and change things to what I want including working with checkboxes. What I can't seem to do is change and ...
Bigfoot002's user avatar
-2 votes
1 answer
5k views

This code is after the browser's loaded. I need to change the li class buddyName - "Strider" to "Aragon". <script src="./scripts/fellowship.js"></script> <main> <section id="...
Sharon M.'s user avatar
1 vote
0 answers
42 views

I wanted to use jQuery to tweak the copy-mechanism. I noticed that when the anchor and focus nodes of a selection were the same, the corresponding jQuery objects (compared using the .is method) were ...
Christoph Frings's user avatar
2 votes
1 answer
468 views

Following that discussion, I'd like to understand how to use TreeWalker to change text on textNodes filtered by class names. I'd like to replace all numbers with "x" on <p class="french"> only. ...
DimNC's user avatar
  • 130