I have searched through several posts regarding this same issue but none seem to resolve my problem. I am getting this 404 error in my console: index.css:1 GET http://localhost:5500/assets/css/assets/css/Battleship-Wallpaper.jpeg 404 (Not Found) I have the image saved in .jpeg format inside of my CSS folder. …
Tag: javascript
Set PHP varibles on button press without using POST or GET
I need to set 3 PHP variables on a button press, but the problem is I can’t use POST or GET to do it due to it refreshing the page which breaks my JavaScript code as it includes an onClick event listener. What I want my code to do exactly is, on a button press set 3 variables, $title, $description
Allow user to type regular expression into column search bar, datatables
I would like to be able to type a regular expression, for example ^.{2}06.{4,}$ into my individual column search bars. For reference I was able to do this when I was using the client side version of DataTables, but since switching over to server side to handle my larger table I haven’t been able to repl…
I don’t know why I get this, if it is according to the React manual
I tell him I am transferring an event from the component child ( ItemCount) to the parent component parent ItemDetail the onADD event that only acts if an item is passed to it and when it does, the state becomes true. The child has an event called add to cart which triggers the event and passes a product coun…
How do I get the index of two variables, compare them, and return true or false
I am making a trivia game that uses an array of objects. I think the correct way is to get the index of the correct answer by using .find, getting the the index of the selected answer, then use an if statement to compare the two. If they match then the console will log “correct” or “incorrec…
Validate kendo upload control
I have a user form with a kendo upload control. I need to make sure the upload control has been completed before the user is aloud to submit the form. Uploading a file is just an optional. I will like to have a message to the user if they hit the submit button that lets them know the upload control
Module parse failed: The top-level-await experiment is not enabled (set experiments.topLevelAwait: true to enabled it
I am using axios to access the backend when a user registers, it takes their name, email, and password and dispatches REGISTER_SUCCESS when they are successful. When a user fails to register, it dispatches. for dispatch am using redux thunk as middleware so i can write dispatch in arrow function REGISTER_FAIL…
Unable to catch exception inside a Promise
I am trying to write a retry logic to connect to AWS Aurora db for mysql. Aurora db can sleep if it is left idle for a specified amount of time and performs a cold restart upon receiving a request. The restart can take 30-50sec and to establish a connection, I am doing three reattempts in the code below. To
Javascript – Deeply change property value inside array of objects?
I have an array of objects. Each object looks like this: The problem is that each object can have childNodes, and those childs can have also more childs… The property that I want to change is selected. This property defines wether the object is selected or not and therefore display a different className…
Advice on how to resolve an issue with extracting only numbers from a string using JavaScript
I’m new to stackoverflow and would appreciate some advice to help me solve this problem. I have two strings that I want to extract numbers from String 1 = “12.3,Name1,3,4,Name2,35,Name3” returns [12.3,3,4,35] Which is the required result. String 2 = “12.3,22,Q” returns [12.322] W…