Category "html"

How can I check if an element still exists in the DOM?

How can I check if an element still exists in the DOM? <div id="parent"> ... <div class="my-class"></div> </div> let parent = docum

Generating List Items from an Array with Javascript [duplicate]

I am trying to generate a list of names from an Array with this piece of script const names = ["John", "Hanna", "Luis", "Halley", "Maive"] con

I am trying to store form values in local storage on submitting form. now i want that all input tags should be cleared once i clicked on submit button

var formHandle = document.forms.infoForm; formHandle.onsubmit = processForm; function processForm() { var formName = formHandle.f_name; var formCol

javascript canvas wont render with custom framework

I am making a simple JS game framework and I am trying to make an image that can move around canvas with WASD. The code below should render a movable image but

How can I make the text and image be on the same level?

I am trying to make the text and image be on the same level but when I add the text the image moves, I am unsure on how to fix it and looking for help. I though

Why does the canvas have a black background?

Why does the below canvas have a black background? Because of it, the text behind the canvas is not visible. I need it to be transparent to show the elements be

Issue in html code for redirect user to url after is logged

Hi I’m html learner and I have an issue with my code but I don’t know what’s the problem The prob is weird , when i enter the right pass in on

Updating a Dropdown Based on the Selection of Another Dropdown - replaceWith Not Working

I have a couple of drop downs, when a venue is choosen from the first one, it should populate the second drop down with floor values. Using jQuery AJAX I am abl

HTML shows Flask-SQLAlchemy syntax?

When trying to display replies of users on my page it displays them with SQL syntax, like so: ('reply',) I've tried str() when returning from my route. html: &l

Calculating a matrix to invert a "flattened" 3D rendering context

Context: In my web app I create several groups of elements all positioned relative to each other in 3d space. All elements have transform-style: preserve-3d. A

Is it possible to append to innerHTML without destroying descendants' event listeners?

In the following example code, I attach an onclick event handler to the span containing the text "foo". The handler is an anonymous function that pops up an ale

Is there any way to use flex wrap to wrap on only one column?

Let's say I have 3 divs... HTML: <section class="features"> <div class="item"> <h3 class="item-name">Item1</h3> <

In TypeScript, I can't seem to delete a specific value from an HTML table

I'm extremely new with JavaScript and TypeScript (like, day 3). I need to let the user delete a value that they entered into a table. I've been working on this

Are there any performance issues with inlining CSS rather than using "chunks"?

Modern frameworks like Vue and React start with inline CSS inside individual components. For example, in a Vue single file component, we include all the Javasc

Animation to center a div in the window

Hi I need an animation that makes a div go from left to center, but it doesn't work. This is my code: $(document).ready(function () { $(log).click(funct

HTML not being displayed properly in Flask, Python

I am trying to make a website using Flask. I have designed the HTML using TeleportHQ, a drag and drop HTML designer that gives you the HTML and CSS files. I hav

HTML submit form from select but comma separate values in GET

I have a simple HTML form that has a dropdown. <form method="get"> <select name="category[]" multiple class="form-control"> <option v

HTML submit form from select but comma separate values in GET

I have a simple HTML form that has a dropdown. <form method="get"> <select name="category[]" multiple class="form-control"> <option v

VSCode Snippet - Dynamically generating characters based on user input length [duplicate]

I have this basic snippet for vue-html { "BANNER1": { "prefix": "banner", "body": ["<!-- ----------------", "/// $1", "

VSCode Snippet - Dynamically generating characters based on user input length [duplicate]

I have this basic snippet for vue-html { "BANNER1": { "prefix": "banner", "body": ["<!-- ----------------", "/// $1", "