Question: I have a spoiler code that works well in my Blogspot blog. But when I place the same code two times in my blog (like spoiler 1, and spoiler 2), spoiler 1 works well, but spoiler 2 does not open. Why? How do I fix it? Please help. I do not know programming. Here is code of spoiler that
Tag: javascript
Need help for a Vue – BMI Calculator
I am learning Webdev with Vue. And in my project, I built a component to calculate the BMI of a person. I have created a form with bootstrap-vue to get the values I need. And now I need help for the JavaScript part. I just don’t know how to correct it. Formula I have used: Answer A few issues: The
How to calculate the amount in invoice for dynamically created input field in codeigniter
I am doing invoices in Codeigniter. I want to calculate the amount and I am able to do first rows (dynamically created). But for second-row, it’s not working. can someone help me with this? I hope my question is straightforward… My code for inserting rows dynamically and here is my js code for calculation Answer The main problem with your
What are major differences between Controlled and Uncontrolled Components in react-hooks-form?
I am using react hooks form. I read from documentation about controlled and uncontrolled. Controlled and this is UnControlled form Can somebody please tell what difference does it makes? And what do i gain by making controlled components instead of uncontrolled? Answer React Hook Form embraces uncontrolled form and input, which means you can still build controlled form and input
how to place sliced images into a javascript table
I have to place images into a table, only using java script. I have this so far., and i am unsure of how to get the images to actually display as actual images for the javascript table. My teacher told us to use document.write, any help will be appreciated. Answer You need to use something like below for image:
webpack is not running after starting separate expressJS service
For some reason I do not see webpack being kicked off. My script stops right after yarn start and never runs webpack-dev-server –watch –env=dev –open part of it in my dev script. I suppose that’s because the node service doesn’t exit and continues to run so I never get a completion hence the && webpack-dev-server –watch –env=dev –open never runs?
Calculate time ago / days ago from javascript dates that had to be converted to string
Due to limitations with next js, data could not be passed to client without being converted to string. So date obtaned from database is is now a string: I use new Date() to get the current date and convert it to string as well (Notice T is missing from my string date) In both cases, I the code below to
Strip external formatting but keep indentation and carriage returns on element input
I’m using the following: In Chrome, I’m given the option to “Paste” (undesired result) or “Paste and match style” (desired result), but in other browsers only “Paste” is offered. A regular “Paste” keeps the original content formatting that I don’t want, like text colors and background colors. This is creating an undesirable result for my use case. What I want
compare an array and object to see if item exists
I have the following: An array then I have an array of objects How can I check if myArray value is found in the myObjectArray? I thought about looping through myArray and then in each iteration looping through myObjectArray to see if it is present. However this seems so 2001. Any ideas? Answer if you want to check if an
How to push to a child node while updating values in the parent node Firebase RealTime
I am trying to update the values in the parent node of a firebase realtime db while simultaneously pushing data to a child node, however I get the error “Reference.update failed: First argument contains a path /xyz that is ancestor of another path /xyz/…/…” And my data is structured as so: Answer Your updates contains these two keys: It helps