I want to make a countdown timer that uses a command /timer minutes seconds where the user chooses how long the countdown will be. I want the bot to send the timer as a reply to the command which I’ve successfully done. However, I also want the message to update along with the timer. I can console.log t…
Category: Questions
How can I use JavaScript to delete a row in an HTML table and its associated data when a button is clicked?
How can I use JavaScript to delete a row in an HTML table and its associated data when a button is clicked? What is the most efficient way to identify the row to be deleted, and what method should I use to remove the row from the DOM? Additionally, how can I ensure that the deletion of the row does
How to use and different options with element to redirect to an external website
I am trying to implement a list of options using <form> and <select>. Researching on the web, I notice that this is used to redirect to sections of the same website, but I want to make it work so that the user display the options and when they click on submit it redirects them to an external websi…
I want to connect react and firebase
I have problem with Firebase and React. This problem is after click to my add-data button for adding data to database. I get this console.log Reference_impl.ts:482 Uncaught TypeError: db._checkNotDeleted is not a function at ref (Reference_impl.ts:482:1) at insertData (Modal.js:44:1) at HTMLUnknownElement.cal…
How to count values without the duplicate in react
Language used : js with react I need to count how much “theme” I have but not if he’s already count/exist data example : Here, i have two theme : love and horror. I know how to get the number of theme but i don’t want to count the duplicate, so here i only want to get “2” a…
In PSPDFKit how do I get highlighted text?
There is an older response to this question in How can I get the highlighted text from PSPDFKit? but all the links are dead and the solution may have been refactored drastically since 2014. All I get from the response from instance.exportInstantJSON() is the coordinates of a rectange annotation of my highligh…
jQuery offset(), position(), offsetTop and getBoundingClientRect() all returning wrong top values
I apologize if there is a simpler answer for this. I have been all over Stack Overflow and will probably get flamed for this question. I am using a static site generator to dynamically generate API documentation. On one page I have a 2 column layout, and would like to align content from the right column with …
Replace (fix) non UTF-8 character in string
When I am parsing a string to become a JSON object there are some special characters that are replaced with the black question mark (�), I believe that is an issue with the encoding of the character. Is there any way of replacing the question mark with the correct character (é) or is it lost? Answer From the …
How to read the content of an Axios post response?
When I send the same POST request with a cURL command, I get this as response: When I add the POST request in my code and print it with console.log(“response: “, response); or console.log(“response: “, response.data); , I get this printed How can I see the content of the response print…
How can we remove the duplicates in async function of java script
I am taking the data from backend for that I am using the async function. But the data contains some duplicate elements so I need to remove them and get those data in DOM. Can we do that. If yes can you explain how to do that. Here data comes from backend and from that data only needed to print