javascript

Uncaught TypeError: Cannot read property 'getContext' of null

Inserted the code on JSHint no error, but the browser gives Uncaught TypeError: Cannot read property 'getContext' of null at ... box = 32; var score = 0; function drawGame() { ctx.drawImage(ground, 0,0); } var game = setInterval(drawGame, 100);

How do I create a cube with only HTML and CSS?

I have this code, and I want to make a cube with HTML and CSS, just like in the picture above .mainDiv{ positio ... ade to the code? Free translation of the question How to create a cube with only HTML and CSS? from member @Sunil Gehlot.

JS input type= "text" value multiply by constant value (price)

How to multiply the value from input value= "text" by a constant value from div. constanta For example: <input type= ... Val"> If we change the value in input to 5, the result changes to multiplication: 12500 How do I do this? Thank you

How do I make such a parallax effect?

How to make the same effect as on the site https://www.fotonaut.cz/en/ ? I am interested in the behavior of pills (tablets), ... And they move even when the mouse doesn't move. I am interested in this effect. Does anyone know how to do this?)) Thanks!!!

How do I find out the size of the running browser window?

I'm new to Javascript and I need to find out the dimensions of the executing browser window, and set these dimensions in < ... t.documentElement.clientHeight : document.body.clientHeight; } </script> How do I set these values to <div>?

Rotation of the background image when scrolling the page

body { background-image:url(cog.svg); background-size:auto 100%; background-position:center; background-attac ... otates clockwise, turn up-against. I take it you can't do without javascript? Please tell me something useful on this issue?

Getting value from form in php

I have a question about php: how do I get the value values from input from form, if form has not been sent yet, how do I do t ... the value of input is sent? And also, if possible, how do I get the data in the same file without sending it to another one?

JavaScript stopped working

And so I use phpDesigner 7. Denver is installed, the site is standing, everything works. I connected the jQuery library to ... the pshPdesigner, created a new file with javascript, Denver rebooted, rebooting the computer, nothing helped. What's it?)

The polygon is not displayed on Yandex map

For some reason, the polygon is not displayed, there are no errors, the route is being built, in general, everything works, e ... seKm) * data.billing.km; if(duration > baseMin) cost += (duration - baseMin) * data.billing.min; return cost; }

How do I turn off input type=radio?

When you click on input type=radio, it turns on, but when you click on the same input again, nothing happens, is there any wa ... either through an attribute in html or in css, but if there are no such options, then there is already a sample code in js.

How do I prevent the form from being sent by pressing the ENTER button?

In the form of a button with an on-click. You need to prevent the form from being sent by pressing the ENTER button. Is there any way to do this? Or to make Enter work the same way as pressing a button.

How to add a row to a table using AJAX

I am currently studying the AJAX technology and a difficulty has arisen. I want to add a row in the table when I click on the ... console.log('ОШИБКА: ' + respond.error); } }, error: function() { console.log('ОШИБКА AJAX запроса: '); } });

Opening a new tab by clicking on the extension icon in Chrome

How to make it so that when you click on the extension icon in Google Chrome, not a popup pops up, but a script is executed (gen.js) and the tab opened?

How do I pass an array from php to javascript?

There are two questions: 1) how to get what I need from the database. 2)how to transfer what I got from the database to javas ... part of what I plan, but it's already good that one piece is ready. I'm not a web developer at all, I work with android OS.

JS asynchrony (script hang-up)

Please tell me how to prevent the script from temporarily hanging while the loop is running. As far as I know, it is impossib ... gt; <button onclick="go()">Отрисовать все сразу</button> </div> <h1 id="timevis"></h1>

How to add sound and images to a website

I have a language learning simulator https://www.trenajor.me. I want to make it so that when the user selects a song, he can, ... nds occur? It's the same with the pictures. To click on the button to open a window and display this word from Google images.

Dynamic shadow from the video

I have a video and I want to make a dynamic shadow of it. I was never able to do it, but I was able to do it with the image: ... block: <video autoplay muted loop id="awesomeVideo"> <source src="video.mp4" type="video/mp4"> </video>

When you click on the video, zoom in to full screen

Hello everyone I need your help. I made the video playback on hover, and now I need it to increase the full screen when I cl ... function() { this.pause(); }) <video> <source src="video/fortnite.mp4" type="video/mp4"> </video>

Multiple slick sliders on the same page

I put 4 pieces of Slick Slider (Slider Syncing) - this is where there is one big picture at the top, and a carousel of small ... t;/div> </div> </div> </div> </div> </div>

How to implement animation of smooth morphing of image borders?

There is a picture, when hovering, its borders should start to randomly float, bend, until the cursor is removed. As far as ... ted to svg morphing, but I didn't find an example. Only pure svg animation, no picture. Maybe someone has a specific example?