Questions tagged [javascript]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

Filter by
Sorted by
Tagged with
-1votes
0answers
5views

Setting the value of an input to a variable outside the function in JavaScript [duplicate]

How can I set the value of input to a variable for using outside of the function? <input id="myInput" onchange="myFunction(value)" /> <script> let result = "&...
0votes
1answer
7views

How to change just one parameter using Redux?

I try to update my global state using Redux, but I try to update just one paramter of five, not all. My store code looks like: const initialState = { loggedIn: false, thisUser: {} } export ...
  • 27
-2votes
0answers
5views

I need to cut a page with 10 <div> elements and paste to another page, to paste i have to crate 10 different div, dynamically increase the number [closed]

enter code here if the number of div from the first page is increased or decreased based on that increase or decrease the number of dynamic div
0votes
0answers
3views

How can I define the type for my firebase user state in react typescript?

I'm having difficulty defining the type of setUser. I have created a custom hook for firebase authentication it is working fine on the custom hook page but when I import the user into another page the ...
  • 27
-2votes
2answers
16views

Need help to convert NaN value to 0 inside app.post in .js file

In below code question1 value is coming as NaN i want to convert it to 0 but i am not able to do it using parseInt.Please help me if i can convert NaN value to 0 app.post('/auth/total',function(req,...
  • 301
0votes
0answers
5views

MongoDB Atlas connectivity with Node does not work

I am trying to connect and run Node.js server and connect to collection on MongoDB Atlas. Howewer, I am geting crash in line where I should get connection response. Please advise: .env file: ...
0votes
0answers
8views

Having an issue getting vaues to onClickHandler Due to MUI

So I want to get a category navigation which contains icons and labels. I've tried with Chips: {categories.map((category) => ( <Chip ...
  • 41
0votes
2answers
13views

Why Am I Getting 502 Error After Adding Require In Express JS File?

I am trying to require a js file in my express api but I am getting a 502 error whenever I do. The file getJSON.js is in the same directory as my express js file but for some reason I am having ...
  • 197
1vote
0answers
7views

trying to get calendar component to fit into top right component without bugging things out

I'm using tailwind to try and make some features sit nicely together. Currently having some issues with trying to get a calendar component to fit above other components in a dashboard, <div ...
  • 204
0votes
0answers
4views

Vuejs Cannot get the result of an imported Javascript function

I'm struggling with an import an use esternal function in Vue js I have a fonction that get an object from S3 bucket and i will for sure use it several times in all my project. So my idea was to ...
  • 26
1vote
2answers
19views

How to iterate over array and save data using hooks

Tha idea is iterate over a array and save (or update) values. const [skills, setSkills] = useState([]); useEffect(() => { Object.entries(array).forEach(([k, v]) => { console.log(&...
0votes
0answers
4views

Several swiper slider in one page

I've put several sliders on one page with a single design and config for all of them when clicked 'swiper-button-next' all sliders act to that! how can I make it work only on the intended slider, the ...
-3votes
0answers
13views

issue in html and JavaScript [closed]

function show result in JavaScript is not working yet after review and revision for al codes in html, CSS and JavaScript but the message report (alert) is not work.
0votes
1answer
11views

javascript hashmap one line modify or create

I want to know if there is a clean way to modify a value in a hashmap or create it if it doesn't exist without doing an if block. Example of what i'm currently doing let dict = {} if(dict['key']){ ...
0votes
0answers
6views

How to use/install sodium-plus

I have an issue, I don't understand how to "install" sodium-plus for using on my website. I installed : <script src="https://cdn.jsdelivr.net/npm/sodium-plus@0.9.0/index.min.js"&...
  • 11

15 30 50 per page
1
2 3 4 5
155653