I've got this error: index.js:29 Uncaught TypeError: clone.getElementById is not a function at HTMLButtonElement.changeImg (index.js:29:11) change ...
I've got this error: index.js:29 Uncaught TypeError: clone.getElementById is not a function at HTMLButtonElement.changeImg (index.js:29:11) change ...
I am just starting out but I am stuck in what many will likely find to be a simple problem. I am trying to have multiple inputs concatenate after a bu ...
If the "slick-initialized" div tag doesn't exist within a parent, then I want the parent ID (product recommender-recipe) to display none. Right now th ...
const d = document.getElementById("added"); if (d) { d.innerHTML = "Test2"; } else { d = document.createElement("div"); d.innerHTML = "T ...
Im trying to do something really simple I know I should probably be using ajax but I'm just doing some quick tests. so I have a display.php file with ...
On an Angular project, I want to restrict the viewport of an IntersectionObserver to a specific part of a DOM. I define the element to use as root wi ...
I use javascript to make a table that have rows and columns based on the number of cells of a matrix. I'll try to use a function, but it doesn't recog ...
I have an html with asp C# backend application, where I would like to display a string in the format "data:image/bmp;base64," + base64 encoded string ...
I would like to create the following structure: So the results would look something like: Label: Here is the text I have tried doing using the fo ...
In the process of learning some JavaScript, I've managed to assemble examples that help me periodically (every 3 seconds, in this example) refresh the ...
tried to read and learn some code from github so I copied below link and tried to run it on my intellij https://github.com/bradtraversy/50projects50 ...
Edited original post: Skipping all the back story and why it is so, I have an auto generated HTML form with elements that have a consistent Id, but no ...
I need to dinamically change this code: So, I have a JS function where I do: the problem is that the result is: instead of: So, how can I ...
I have 18 buttons that I can click and I have the same function (clicking it changes the image) for each button and I would like to just use 1 functio ...
I have a React application that opens a modals conditionally when buttons are pressed. I want a way to access these modals even when they haven't been ...
I'm new to programming and hope you can help me out with this little number comparison game that I'm trying to build. I have two functions. The first ...
I have a javascript code like this: var confirmbutton = document.getElementsByClassName("btn-primary-md"); for (var y=0;y<confirmbutton.length; y+ ...
Here I want to make a simple translator. I want to make a translator that translates the sentence directly. I use this code as an example. But this on ...
i created my own component that contains 2 inputs(type: range, number). I want to hide one of them after another checkbox is clicked but getElementByI ...
I am creating a quiz application in angular.I am fetching data from api in which there are countries and their respective capitals.I have fetched them ...