I am using angular and I would like to implement a bug report function in my app. For that I want to send the content of the browsers console for debugging. But how can I reach out to it. Not every error is thrown manually with console.log(… so that I could save it at the same time, some errors are
Tag: javascript
Using ES Modules with babel-standalone
Quoting babel docs https://babeljs.io/docs/en/babel-standalone#usage : “If you want to use your browser’s native support for ES Modules, you’d normally need to set a type=”module” attribute on your script tag. With @babel/standalone, set a data-type=”module” attribute…
Checking color of an input to disable or enable a submit button
I’ve set up a changing input background color dependent on validity of the input. I am then checking the color with this code: The only thing I am missing is how to continuously check the colour when active (it’s already inside a called function). Currently the “disabled” is true becau…
Reload saved data in editor.js using Vapor 3 backend and Leaf page
I am using a editor.js in a leaf page to allow my users to create a text document. When the user hits save editor.js ouputs what they have created as JSON and I save this to the database with the Vapor back end. This all works fine. I now want the user to be able to go back into the
Not able to open react-bootstrap modal from child component using react hooks to setState
I’m trying to trigger my react-bootstrap modal which is in the parent component from a button inside the child component. To achieve this, I am passing the handleShow function into the child component as props but this doesn’t seem to be working. The modal doesn’t open up on clicking the but…
how to perform sum/minus operation on an array of objects, based on similar values(not properties) in an array of objects [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 2 years ago. Improve this question i hav…
Character with longest consecutive repetition
i think i have wirtten the correct code for the problem only one thing and it that i return the first longest sequence how can i alter that to return the last maximum sequence? an example from codewars editor : for input ‘0000000000000011111111111111111222222222222222333333333333334444444444444555555555…
The post request works in Postman and in cURL but not in Angular
I have a remote server and a local client which sends a simple post request with one header Content-Type: application/json and with the body ‘{“text”: “hello”}’. The server code is here. It prints the request body and the header. The post request works fine from Postman and…
How to get if a specific user is online?
I’ve got some code which should send in the current status of a user if they switched to online, but the problem is that it sends the message twice AND that I can’t check who the user who changed their status is. I just want it to check IF the user who changed their status is a person with a
Javascript increase [i] when checkbox == true
I want to give IDs to divs from checkboxes which only are checked. E.g. I got 5 checkboxes and every time a checkbox has not been checked the loop should increase all upcoming checked checkboxes by 1. So in this case the third div should get the id=”4″ but the loop stops after a checkbox is not ch…