I’m building a responsive top navbar with a toggle button, and trying to change a CSS property from display:none to display:block, but I can’t get it to work. The menu is receiving the class “show” with the display:block property in it, from the toggle button (confirmed watching the co…
Tag: html
HTML if else condition for printing items in list
I’m making a website with flask, and I pass in a list. My .html file has this code: Now if list.length == 0 I want it to just do something like instead. How do I make an if statement to check if the list is empty, and if it is then I print error on the website, if it is
Onclick, Highlight only one list item in an Unordered list
I am following a code to make a quiz. I am building a function to highlight one list item and add a class to it. The code is working but i do not understand the if condition from the source. Can someone help? Answer answer.querySelector(‘.selected’) will return the element with .selected class if …
Display div based upon datalist selection
This has probably been asked about before, but after several hours of looking I can’t seem to find anything. I have a datalist which is meant to display a div based on your selection of the datalist. Whatever I do, I can’t seem to find out how to do it. The best I can get to work is have both
How to show day from input date in CodeIgniter
I want to show day into textbox based on my input date here is my ajax to change the textbox : this is my controller : this is my model : is there anything wrong with my code which not showing the day Answer Not sure if this is the part of your problem, but looks like you may be
HTML Javascript redirecting user with if statement does not work
I want to use user input to decide whether or not the user is redirected to another page. In this case, the user inputs a username and password. If the username and password is correct, then the user is redirected. For this, I use simple javascript and html: However, when I fill in the correct username and pa…
Hidden password only works in one input box
I have this JS code that shows 2 input boxes that asks for a password: 1) Password 2) Confirm Password. However, the clickShowPassword() is only connected to Password. [Output] [1]: https://i.stack.imgur.com/IZoa3.png Here’s my whole js file that is connected to an react application. Answer In your seco…
Overflow-x scroll doesn’t work properly on mobile
https://codesandbox.io/s/frosty-water-fintki As you can see in attached sandbox I have a scrollable div with 6 items aligned in 2 rows. But when you switch to mobile view (toggle responsive view button near sandbox url input) it starts scrolling vertically. I’ve noticed, that if you remove flex-wrap it …
jQuery non-text input validation
I have a Bootstrap table I obtained from Tutorial Republic. It goes as such: When you click “+ Add New” and try to add an empty record (leaving text fields empty), you are prevented from doing so and the textbox’s border turns red. However, when I add in a date field, I am still seemingly pr…
How to button clicked using playwright testing framework?
Currently , i am doing an end to end testing in my nuxt project. I want to test the frontend of my project to ensure the UI is presentable and clickable. However , I am facing a problem for my button. It felt like button is not clicked. I am pretty sure the css selector for my button is correctly