I am currently trying to load a .obj model into my three.js project. I feel like I have all the code correct becasuse my code compiles without any errors, but when I go to Google Chrome’s console it is giving me this error. . mainpage.html mainpage.js Answer Try changing: To -> Basically, you’r…
Category: Questions
Using HTML and Javascript to make a concrete supplies calculator – Takes a value of both ____m3 and a select option (mpa) to give a total price
This is my first time asking a question on Stack Overflow so apologies if I get something wrong. I am currently building a web calculator for a concrete company. Here are the details of the inputs: There is a form with the following inputs: Input 1: Cubic Meters (m3) Input 2: Strength Input 1 takes a value be…
How to search for string in any order
I have a .js file with an array of strings inside. Let’s say one of my arrays has the string “The quick brown fox jumps over the lazy dog”. I can search “The quick brown fox” and it will display the string in my array which has that value. But if I were to search “The quick…
ReactJS: Unable to get the value from a select dropdown because the value is undefined
I just wanted to make a proof of concept that based on the person’s search text and the option they select from the dropdown it will redirect them to the search engine of their choice. When I hit search it throws an error saying that the selectedIndex is undefined. Is there a syntax mistake I am making …
How to carete dynamic NavBar with only JavaScript
I have this code right now, but its not working on the DOM, I am wondering what is the problem with my code. My current code: “JavaScript” “HTML” < Answer call the function or avoid the function. try it
Sum of Elements in 2D array
I have a 2d array and was able to pass it from code.gs to JavaScript. The next thing I want to do is to sum all elements or numbers example in column 2. I’ve seen this code while searching online but it add all elements in the array. I don’t know how to personalize it to meet my needs. `
How can I fix this for loop to print results inside an Array with Objects?
Rookie here, I have been breaking my head all day trying to figure this one out… I have tried different approaches trying to figure this out and looking all over this site for some references, but I have come short and hit a roadblock. This is my code currently: I’m trying to get it to console log like …
Mongoose how to extract value from findOne() and use that to update value
And the console log shows flightNo as { flightNo: ‘UA567’ } I want to use the flightNo “UA567” in findOneAndUpdate. But this function fails. How can I extract the string from the object? Answer flightNo is an object which contains the field ‘flightNo’, you can access the va…
Get Reponse Code and JSON Response in Fetch
I have following Code to get the Response from the API. Now I want a response if the data are successfully send to the server. My first idea was to do it with the response code. If it is 200 it is successfull. The other idea is, to make it with a try catch statement. Getting the response from the
Nested routes authentication in NextJs
Is there any way we can Authenticate all the nested routes ? In my project I have routes which needs authentication and routes which can be accessible without authentication. For eg. /admin => needs authentication /admin/posts => needs authentication /admin/posts/1 => needs authentication /admin/user…