I’m making a rock, paper, scissors game, but it seems doesn’t work well. I’ve tried looking for mistakes though I can’t find any. When I click the image, it doesn’t pop out as well as the text/message. The console said: Could you please help me correct them? I really appreciate y…
Tag: html
Why does window.getComputedStyle(element).getPropertyValue(“order”) doesn’t returns order of a flexbox element?
From MDN Web Docs: “window.getComputedStyle() method returns an object containing the values of all CSS properties of an element, after applying active stylesheets and resolving any basic computation those values may contain.” Window.getComputedStyle() returns a CSSStyleDeclaration object which co…
SVG path with stroke fills the svg element
I have a set of coordinates that can be used to create a polygon in google maps. I used the mercantor-projection formula described in this answer to convert it into a set of points (x,y) that can be used in an svg . The conversion was successful and it was rendered properly. The snippet below renders well wit…
Automatically inserting window.location.hash into html input value?
Here’s what I’m essentially trying to do: What’s the proper way to insert the window.location.hash into the input’s value? Note: I’ve found several ways to do this when people are required to click a button, but nothing that explains how to do it automatically when the page loads…
Filterable gallery using slick.js
I’m trying to create filterable gallery with differents buttons but when I click on them the filter is working but that let empty space in the gallery for the other pictures. I tried to use different script from the forum but that always let empty space. This is an exemple of the HTML : And the JavaScri…
Play an alarm with the table value in webapge
I have a webpage containing a table that auto-refresh everytime & updates the table values. I want to add an alarm when the table value reached a threshold value so I don’t have to look at the table always. what is the best possible way to do this? My webpage is updating data using PHP. I know this …
html5/css/javascript : How to superpose two canvas in a div
Hello I’m stuck on a superposition problem of two canvas. Here is a simplified example. Note that in the real application, buttons and drawings are far more complicated and that I want to keep the structure with html5 / css / javascript. I suppose that I miss something in the css to succeed to have thes…
How to solve Cannot read property ‘map’ of undefined error in React js?
I am building a react js application with dummy backend using json-server.I am implementing a dropdown list but I am getting Cannot read property ‘map’ of undefined error on fetching from api.The api is working fine in browser but while fetching in react it is giving me this error. My component: M…
Updating Table With User Information from Modal Popup
I am trying to update a row with just the name entered from a modal popup, where the user enters name, email, and phone-number. I attached an eventListener to the button Submit, that has a updateTable function that I am having a hard time understanding. I see that is grabs the data by table row with querySele…
Hello, I want that an icon on the page changes when I click on it (using JS) but It is not working
So the problem is that the JS is not working, can someone help me ? Answer Not sure if this is what you are trying to do.