Calling all experts! I am trying to add a class to disable all element’s descendants to be read only, the style is fine, but it doesn’t applied to all descendants nor any: The element is a component that I want to have the above style by displayName as div id, like so: The output HTML: The final r…
Tag: html
Move large image inside smaller visible container
I am trying to do something basic (beginner in programming). I try to take a large image and a smaller container, and move the image up or down inside while the user scrolls. So you can . Move the yellow up or down while the user can see the red in the same position (kept in doc flow). If i
Add 6 months from one date picker to another datepicker
I have two datepickers and one combobox in HTML. The combobox contain 2 values (6 months and 1 year). If I select 6 months from the combobox the second datepicker should show the date after 6 months from the first datepickers date. I need code for this using JavaScript only not in jQuery. My code is Answer I …
Allow only numbers with only specific alphabets in textbox
i have a text box in html, i want to allow user to only input following range 0-9 and NA there are two cases 1: user inputs range form 0-9 numbers and 2: user inputs only NA (NA denotes Not applicable) how could i allow user to do this I try following code but it does not work Answer Add
comparing one dictionary with array of dictionary
I want to add or remove a dictionary on the array based on two cases. For example, Let us create a array of dictionary, Let us consider two cases, Case-1: An input dictionary that has both the same key and value which is in the Result variable. then the result should be, Case-2: An input dictionary that has t…
Flask application redirects to empty “about:srcdoc” page when index (root path) is requested
I am working on a Flask web application. It has two iframes side-by-side and accesses a csv file. The file contains urls that, by using selenium .page_source(), will be loaded into the iframes using srcdoc. The page source is edited using beautiful soup 4 before being turned into a string and being sent to th…
New line string from javascript
I cant do new line from javascript, I tried to do that with n, but nothing. Answer Apparently you are pretty new in javascript. You should use <br> instead. n new line for console outputs. Also you should use innerHTML instead of textContent. With textContent Console example:
Form submit without PHP
I’ve been trying to figure out how to submit form data without using PHP code, is there a way? The mailto: in HTML 5 only has the user fill the form out, then when submit is clicked, it opens another application (mail app on desktop/laptop, and mail app on smartphones) and puts the data fields inside the mess…
Odd over-scroll behavior
So we have this website, and when you scroll all the way down to the bottom it keeps scrolling. I’ve tried lots of ways to fix this and haven’t come across a valid solution. It seems to be adding margin outside of the main <html> tag. Any help would be greatly appreciated Only custom JS adde…
JavaScript: How to draw multiple rectangles with Canvas using fillRect?
I am attempting to create a simple game where I have two rectangles, a human-controlled player and a “collider” that has to be avoided. I am trying to draw the two rectangles using fillRect(), however only one shows up. For example, putting the “lime” colored rectangle first would resu…