Good morning, I need to be able to show in a corner of the Forge viewer the value of the zoom applied to the model I am viewing (for example “25%”). I wanted to know if it is possible to show this information by adding a text field/box or something similar in the viewer window itself (just as it h…
Tag: javascript
How should I use the callback to get the desired outcome?
Hello there I am getting the desired result when am using promise but how should I implement it with callback when am returning something from the function. result with promise *** using callback *** OUTPUT should be I am first I am second I am third Answer You don’t need that global temp variable, and …
Why does the state variable become undefined when the value is changed in the dropdown menu react?
Here is the table I’m trying to create: When I change the value of the dropdown bars, the value becomes undefined and I don’t understand why. But initially, when I click submit, it works and the alert pops up with both of the default values I set in this.state. This is what the alert looks like wh…
Resolve promise inside javascript map function
I have gone through several questions and posts regarding how to accomplish this but none have worked. I have tried an array (no pun intended) of possible solutions involving Promise.*, thenable, await and none have worked. I have an array of payments that I extract from a Prisma db call, the object looks lik…
Understanding Promise() for Controlling when Form Inputs are Displayed
I have certain form inputs that are only displayed depending on other input’s value. I am trying to control when inputs fadeOut() and fadeIn() with, I think, a promise() but it seems the call-stack still runs everything synchronously – maybe I am not configuring the promise correctly? Here is some…
Change JS scrolling event to time interval
I have an image gallery I’m using for a webpage. Currently, the gallery images change when the user scrolls, but I’d like to change it so that the images change on a time interval, and are on a loop instead of an up scroll to go back and a down scroll to go forward. I’m pretty new to Javascr…
Output string after sring.split(“”).map breaks into pieces on small screens
With great help from @pratik-wadekar I have the following working text animation. Now my problem is that when I test it on different screen sizes/mobile the animated word plants breaks into pieces. For example PLA and in the next line NTS. How can I avoid this? So it always keeps as one full word. First I tri…
How to combine the values which is array of the same property in the object’s array javascript
For the following array : I need a function that should merge arrays with the same keys in the object. Answer Try to use reduce
i want to delete a row from table in javascript which stored in localstorage
I want to delete a row from LocalStorage This Method Works properly But it is removing the last row only, when i refresh it so instead of what i have clicked is not deleting so please help me to get this issue resolve in simple word i want to delete that row from localstorage, so when i reload the page
How to clear setinterval() when resizing and inside condition Using Jquery
I’, trying to run this functin only on mobile devices which is less than 768px , it works on this screen width but it also ignore the condition and works on larger screens than 768px, i tried to clear interval but there is something wrong with my code Answer Based on your code I moved things around to f…