Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

javascript

  1. T

    JavaScript Creating a new array from recursive mapping

    I am attempting to do something very complex. I have a database that has a self relation (categories that contain a nested category). The ORM I’m using makes use of these categories as objects: category = [ { name: "Lights", description: "some description", parentid: "some id"...
  2. Benny_2306

    JavaScript Insert classes using JavaScript

    I basically know no JavaScript at all yet i need it for my current project i am working on to learn scss and html. I have a set of radio buttons an what i need is if a radiobutton is checked, that its label and the labels bofre it get a extra class inserted. (e.g. if radiobutton 4 was checked...
  3. T

    JavaScript Filter out element in a deeply nested array

    Context: I have a form where a user enters in data. I want to remove all object elements in the phone array that contain an empty string in the phoneNumber property. Here is example data: const data = [ { contactName: "Contact 1 Name", phone: [ {phoneName: "Some Name"...
  4. R

    JavaScript How to remove duplicate records from string array

    I have the following array: myArray.push(name); \\Records that are being pushed: Record 1. name = 10132, category = Computer Record 2. name =10132, category = Windows Server, Computer myArray.push(category); var myArray = [10132,Computer, 10132,Windows...
  5. EkBass

    Chat with OpenAIAPI in console

    Hi. For some reason im not able to add code etc. tags to post. Maybe maintenance goin onor something. Anyway, here's the link to a Chat with OenAIAPI in console. Link updated in next post.
  6. dorianu

    Need advice with getting a paid product from an api

    I'm working on a wordpress site that has a bunch of forms. I need to send the submitted form data to an api, in return I get a product. The products are charged by credits that I have on a account. Before I request the product from the api, I have to charge the user. The checkout page is done on...
  7. Studi

    JavaScript How can I include document?addEventListener in this function.

    I have a few dropdown selection lists and want them to exit if you click anywhere on the site/document(make the aria-expanded false) because at the moment it exits only if you click on itself or one of the items inside the dropdown. const selection =...
  8. P

    JavaScript How to write a function that increases the salary of the employee with the lowest salary?

    Good evening, it was necessary to write a function that increases the salary of the employee with the lowest salary. It should: receive data on all employees, find the employee with the lowest salary, send a request for a salary increase to this employee by 20%, if the request was successful -...
  9. P

    JavaScript A function that converts a two-dimensional array to CSV

    hello, please help. I need to write a function that converts a two-dimensional array to CSV format and returns a string. Valid values as array elements are numbers and strings. If a function is encountered, throw an error with the text “Unexpected value”. Example: arraysToCsv([[1, 2], ['a'...
  10. John Weiss

    JavaScript Reg Exp Not Working With matchAll

    Trying to get all delimited items in a string. Here's the code: const myString = "abc{{HELLO}}defg{{WORLD}}" const templateFieldsRegex = /\{\{\w+\}\}/g const templateFields = myString.matchAll (templateFieldsRegex) I expect to get array ["{{HELLO}}", "{{WORLD}}"] Not getting any results. also...
  11. Dan001

    JavaScript Need your help 🤗 : How do I remove hand (pointer) cursor

    hello Is it possible to remove the hand cursor that appears when hovering over a link? 😊 Below my CSS et JS code and in attachment a image. I do not know where to change the code 🤗 I'm not at all an expert in coding. "cursor:none;" doesn't work thank you for your help 😊 <script> function...
  12. iimadouu

    JavaScript how to filter the json response coming from axios request?

    hello, im trying to filter and organize a Json response from axios.get, im requesting a soccer standings table i ve succeded in returning the data but is bit messy, im using node express, axios, and cheerio as you can see on my code below this is my code: const express = require('express')...
  13. Idle Commander - The Dev

    JavaScript Why is this not working [edit]

    I'm making an online free web game and I got to the point where I don't know how to fix a particular bug. What I'm confused about is that the thing I'm building works perfectly when you perform it the normal way but If you go on a quest in my game and fight a monster it breaks. If you want a...
  14. Idle Commander - The Dev

    JavaScript Why is this not working?

    I'm making an online free web game and I got to the point where I don't know how to fix a particular bug. What I'm confused about is that the thing I'm building works perfectly when you perform it the normal way but If you go on a quest in my game and fight a monster it breaks. If you want a...
  15. Kiyoshi99

    JavaScript Simple CSS/JS Tabs

    Hi, Im trying to use the following simple Tabs: https://jsfiddle.net/yw32rLuf/ Unfortunately, these tabs do not work for me, since they crash sometimes. Is there another way to achieve Tabs like these? Fix my Code so that it does not crash? Or even rewrite it completely to achieve this...
  16. ~prop

    JavaScript localStorage.setItem(); is considered undefined

    Hello. I have a problem with my code in JS. I am trying to make new user by reading the input prompt (first function) and saving it into the local storage (second function) but it doesn't seem to work, once I open the project in live server by Visual Studio Code and try to make new user, it...
  17. V

    JavaScript Why does console.log not work everywhere?

    Hello. Why do I only see in the console: jswrapper: JS: my debug network manager 1 jswrapper: JS: my debug network manager 2 And I don’t see: jswrapper: JS: my debug NetworkManager 3 jswrapper: JS: my debug NetworkManager 4 n.NetWorkManager = void 0; console.log("my debug...
  18. R

    How to animate an interactive mind map?

    Hey all Im a beginner with html/css but I am trying to create an interactive mind map and I'm not really sure where to begin with javascript for this something like the first link but the blue circles would only reveal on hover of the center orange circle. also Ideally some sort of animation...
  19. A

    JavaScript JavaScript play audio segment

    I need to call a script and specify 3 parameters, audio file ID, audio start time, audio end time (optional). With zero prior JS knowledge, I'm unable to get this script I stitched together to work flawlessly. The main bug now is that if EventListener is active and a segment is still playing...
  20. E

    Autoselect based on a condition

    Hi, I'm using a Chrome autofill extension. From this saved static page: https://spazioweb.w3spaces.com/reference.html I would like would be autoselected: "INTERNA" in "Circolazione" dropdown field, if user writes "REF." in "Sezione" This should be the "Circolazione" code block, thanks...
Back
Top Bottom