I am creating a site with a forge-viewer and want to view multiple loaded models in a single window. How can I enable the function of loading and viewing several models in one place? This is for a new site. I have already tried all the methods and recommendations available on the Internet,but none of them hel…
Tag: javascript
how to change font/background colors of a selected option permanently with pure javascript
I require the selected option’s font/background colors change permanently to for example red/yellow after user completed the selection. Constraints: Code must work in IE11. No jquery. Pure js. Form has id. Selects, options do not have id. Form has tens of selects. Solution does not have to be inline js.…
Can’t start a “curl:localhost:3000” port, shows URI Error
I am just starting to begin node js, specifically starting up a server, and trying out a new app to trim out an URL. But I am stuck here. Environment: Windows Text Editor: VSCode my code for index.js : After this, I start up the server using the command It shoots up the server and then I open another terminal
How to reuse a function from an existing Cypress test, and call it in a new one?
I have the following function, which is inside a parent function. I have many uses for this random string generator, inside of other test files for different scenarios. Instead of having to copy and paste this each time, I want to reuse this function and call it inside another test file. How should I set this…
Convert array of flat objects to nested objects
I have the following array (that’s actually coming from a backend service): where Item is: In order to be compatible with a component that displays a tree (folder like) view, it needs to be transformed into: where NestedItem is: All I’ve tried so far is something like: But this only gets the first…
Vuejs form not submitting on “enter”
TL;DR Question Why can I not use 2 of the same input fields in a form, and the enter button submit the form More detailed question Straight to the point. I’m trying to use the enter button to submit a form when an input element is focussed, which should then emit an event. I’ve written a codepen h…
update cloud firestore document without id
My Cloud Firestore looks like this: I want to update a document of users given I have an unique identifier for it that is NOT the random id of the document (suppose, for example, the name is unique and I want to use it as identifier). How can I update a document identifying it by a field of it? Answer
Cannot change the background colour of
I’m using react and I came across a side navbar that I like. However I cannot change it from the default red background colour. I tried making my own custom css, and trying entering className: bg-dark etc on any line possible and it isn’t working? Can anyone help? Also here is a link to the side w…
Print set element in javascript
I am trying to print the set element through innerHTML, but I am not getting the desired result. While I tried with document.write(),it is printing but I want to use only innerHTML. Here is my source code: Output: 4 Desire output: 0 1 2 3 4 Please suggest me how to use innerHTML to print the output.I have tri…
jQuery bind click event to button on each option of select element
I’m trying to make a click event on submit button on each option element of select. Here is my script: But, it just work on the last option element. Answer But, it just work on the last option element. I don’t know what you are trying to achieve, but your code should work. Also not sure about the …