Hi I have problem with filtering HTML collection. I obtained list of classes as html collection. One of those class have .active class. I need to remove all other classes from this list and left only next one AFTER active class. Please how to do that? Example of my list: My code: Answer You can directly query…
Tag: javascript
cant get length of m4a audio file on webpage
I am trying to make a nodejs website that will return the length in seconds of any audio file a user chooses. So far I have it working with mp3, wav, and flac files. But it doesn’t work for all .m4a or .aif files The code for my HTML page with javascript is below: I gathered 6 different files for
NextJs Authentication with Next-Auth against DRF
I have an exiting Django project that I am trying to move from templates to NextJs frontend. I came across Next-Auth-js which seems to be nice in Next Auth. However, the doc seems to focus more with JS related Backend Auth. Following this example I have sent the NEXTAUTH_URL environment variable to my DRF End…
Values are null when POSTing to Razor Handler via JavaScript fetch()
I’m trying to POST email content to a Razor Handler, but the request values don’t seem to be properly binding. I’ve been scouring all I can (including many questions on SO) for answers without luck. The code sends the data properly as best I can tell from the Network tab. My breakpoint in th…
How to properly iterate through array using async functions
I have an array of URLs, which I have to download using JS / Cordova async functions. My current implementation looks like this (simplified): Unfortunately, I get “Maximum call stack size exceeded” error sometimes. Is there a better way to do this? Answer I had this issue before and managed to res…
How can i disable the auto-refreshing feature of react-admin
So react-admin seems to have a feature where if you’re idle for a little while and come back it will reload the data, presumably to make sure you’re looking at the most up to date version of a record. This is causing some issues for my editing feature that has some custom components. Is there a wa…
A-Frame Asset Management System blocks JavaScript code
I’m coding an A-Frame project for our University at the moment with a PHP Backend. Whenever I try to load an a-asset-item in the a-assets section, my JavaScript code stops working. I tried changing the gltf model to a glb and to a obj/mtl and I tried using a CDN model from a A-Frame tutorial. If I don&#…
Error [ERR_UNSUPPORTED_DIR_IMPORT]: Directory import when attempting to start Nodejs App locally
I’m caught in a bit of a loop trying to deploy my app to Heroku. My import statements (e.g. import cors from ‘cors’) seem to prevent the app from launching in production, due to the “Cannot Load ES6 Modules in Common JS” error. Locally it runs just fine. However, when I attempt t…
The HTML file dont hit the CSS file
I am beginner in express, js and node.js I have followed lot of tutorials about express, and i dont understand why the index.html file dont call the corresponding CSS file: my server.js file: my index.html file: my CSS file: and the different folders of the project: when i type localhost:8081/0, the result is…
Display Multiple Markers on OpenLayers 5 dynamically with Pop-up window
I am trying to display two Markers on the Map which i already saved in an array. I want the Markers to be dynamically displayed and with a Pop-up window for each one. here is the code i wrote and edited from my Last question. I get nothing displayed on the Map, can somebody fix the problem?, I have tried