Hobbyist coder here, and this problem is above my pay grade. I’m trying to build a dynamic html / css calendar, where the cells are filled in based on today’s date. I get today’s date, and then try to add days to fill in another 13 days (looping thru html elements.innerHTML). If I try to set…
Tag: html
Should the HTML element dispatch `beforeinput` events?
The MDN page for beforeinput states that: The DOM beforeinput event fires when the value of an <input>, <select>, or <textarea> element is about to be modified <select> is clearly mentioned as supporting the beforeinput event. This also seems to be true based on my simple reading of th…
Using submit type but IF statement does not work
I am trying to make a very simple login page for a website I created and I am having issues with the submit button. I got the submit button to work fine if I use a “button” type in HTML however the Enter key does not work then. I discovered if I use a “submit” type, the Enter button an…
How to choose randomly unique number when the button is clicked
I am trying to choose random unique numbers everytime when I click button. For this my function is: But the problem is if the random number is already on my list, I need to click the button again to generate new number and it goes until it find the number which is not on the list. But I want to
How to get radio button to stay aligned when label text wraps to next line?
Right now I have radio button aligned at the prefix text, but when label text becomes long and wrap to next line, for some reason the radio button to move downward and no longer aligned to prefix text. But I would like radio button to stay still whether label gets wrapped or not. What changes do I need to mak…
Can’t get the JS script to output data on HTML page
My code below is a simple form which takes an integer, and a yes/no radio button pair. If ‘yes’ is selected (the left option) then the value you entered * 0.13 should be displayed – if ‘no’ is selected (or neither are selected) then the value 0 should be displayed. It is not work…
How to execute different functions in same script by clicking different buttons
I have a button inside my form as below, So my script as below, from that I will run me testme.php. My testme.php as follows, This works fine..Now I need to do this same approach to many buttons..only different is the button id and the runnning script only… As an example, But I need to change the functi…
Footer won’t stay at bottom of page and below content in React
I have a React application with this basic layout: My issue is that I have separate stylesheets for each of these components, but I can’t get my footer to both be at the bottom of the page, and always stay below content. That is, if the page is blank, the footer would still be at the bottom, and if ther…
How to change the selected tab color when clicked in HTML
From this method I could implement a hover that change the color when mouse over at some tab. But I need to change the color permanently when someone clicked tab. Ex: If someone clicked Page 1, the tab should change color, if someone clicked page 2 then the tab should change color and page 1 tab should change…
Expand volume level by default
I would like the volume level element to be expanded from the beginning, without mouse cursor hovering. I am about this element that is hidden by default: I didn’t find any built-in option for it (strange enough). I’ve been trying to solve it with CSS, but without success. There is a demo of probl…