I made a simple HTML webpage recently, and everything works perfectly, except for on the webpage you can scroll to the right and there’s a strange space where there aren’t any elements and that the background doesn’t cover. I’ve gone over my code many times, but I just can’t figu…
Tag: html
how to add user data javascript
I am having trouble being able to add user input data. I can get it working when I add in the data myself all the users show up in the console in the array. For people 1-3 I would like them to enter their name and favorite color but I can’t seem to be able to store it or at
Avoid vertical scrollbar shift in container
In html, I have a panel with a fixed height which contains cards. It can contain one card or many cards. Hence, because the panel has a fixed height, it can be needed to have a scrollbar displayed in order to visualize all cards. This works properly with the property overflow: auto. However, when the scrollba…
VueJs 3 – Custom Input Component
I’m trying to build a custom HTML <input> component for VueJS3. I’ve been following this tutorial: https://dev.to/viniciuskneves/vue-custom-input-bk8 So far I managed to get the CustomInput.vue component to work and emit the modified value back to the parent App.Vue. What I don’t under…
Function parameter is not defined in callback
I am trying to get the location of the user and using that I am trying to get the city. I don’t why but when I call the query function, the city parameter is having some value but it is not reflected in the callback function’s if condition. However, if I replace the city variable in the If conditi…
How to make floating text onclick like cookie clicker?
When clicking the “big cookie” in cookie clicker, there is a popup showing how many cookies you earned (+276.341 septillion in this image), which slowly moves upward and fades out. I wanted to implement a similar feature in my game, I sucessfully made the moving up and fading out part with css ani…
Trying to update the innerText of an HTML element when a button is clicked in JavaScript
Hey guys. I’m creating an installation widget where the command to run changes depending on the buttons that are clicked (Build version and OS version) I want the command text at the bottom to change when a user changes their build to Preview or LTS and so on. My logic is that it checks to see if the bu…
How can I catch a browser timeout and execute my own error message?
I have a web page (classic asp) with a link to a local IP address, as follows: If the local IP address is unavailable the web browser eventually times out and displays its own error message. What I want to do is: catch the timeout before the browser displays its default error page and display an error on the …
How to get html data-attribute string from a php variable
I am constructing an html form in php with javascript and css, the following line of code works fine and displays a textarea with the required prefix: $form .= ‘<textarea class=”text” data-prefix=”Message from: ” ></textarea>’; However I want to include a php va…
How can I change data-id value in Class with a script?
I need to set random data-id with two value A y B. I need a script that can do this Answer For archiving this think you have to do three steps. First: Collect all values you need into an array. Second: Generating a random integer number. Based on Generate random number between two numbers in JavaScript The pa…