Skip to content

how to style the variable on JS without DOM

I’m about to style the “newResult” with green if passed and red if failed. I’m confused how to style them since the “newResult” is not DOM. Answer You can make use of JavaScript template literals, ternary/conditional operator and inline CSS to accomplish what you’re l…

Sending keys / manipulating value of input field (vue.JS input)

I’m trying to send data to an input field on this website: https://www.avigilon.com/how-to-buy/partner-locator You can programmatically identify the input using the following: if you then pass input.value = ‘33701’ it will change the input, but the moment you press ‘Search’ it re…

Full Page Layout with Bootstrap and Vue 3

I’m trying to create a Single Page Application with a simple layout of Header -> Content -> Footer using Vue3 and the Bootstrap 5 framework. I am trying to get the Content to fill the space between header and footer and footer to flush to the bottom of page & content so there is no overlap. Ho…

Why are the event handlers fired twice?

If I collapse or expand “id-1” then the handlers work correctly. If I collapse or expand “id-1-1” then two handlers are triggered: one for “id-1” and the second for “id-1-1”. Why is the event fired for “id-1” even though no action is taking place? An…

How to have multiple submit buttons for a quiz on one page

I’m creating a language quiz and it requires multiple submit buttons on one page through which one can check their answers. Having one submit button works fine. But so far, having multiple submit buttons creates issues where one submit button, when pressed, generates two (if there are 2 questions) of th…

Why axios.patch doesn’t change data in ToDoList?

Roughly speaking, I have a ToDoList in which I want to change the written task text. But on demand to find an error. The data from the input that enters the changed text is stored in the state (editingText), with this text I’m trying to replace the value in the ‘text’ column. Does anyone kno…