I am new to React and of course, I am facing problems, the thing I am trying to accomplish is this. When any of these Components is opened I want to set an active class. I have already tried something but it is not working. So I want to add a background color to these divs className=’menu__iconsRight ‘ when they
Return multiple queries using Apollo
I am using nextJS for my frontend with apollo and a graphql. And I fetching my queries using the getStaticProps() function. To increase modularity and maintainability I break my queries into multiple queries. I have a folder structure like: src/queries getPost.js getMenu.js getProduct.js index.js And their all queries are put and exported into index.js. The problem is because of multiple
How to return a promise resolved from a callback
I have an issue with my promise logic (still pretty new to JS), and I cannot find what is wrong. Looking at how hard it is for me to do what I want, I can only guess that’s it’s not the correct way to do it. I did found another way to fix it, but I am still interested if
javascript onclick form function
Helllo I have this form that take 3 different input for my app. I try to send that information to my database using API but first I want to print it out in the console to see if I got the value from the input but nothing happen, here is my Javascript code: Any ideas? Many thanks. Answer Issue Identified
insert tr html code into tbody programmatically.not display tr layout
i want to get tr html tbody display data but not sow . i am sharing all code usnig Codeigniter and javascript please share valuable idea.. view (HTML) <input type="button" onclick="…
Making calculator using Ajax with jQuery validator plugin but Ajax conduct submission before the validation
I’m making calculator using Ajax with validator plugin I could make calculator work but cannot implement validator to this… there are 2 issues. Since my HTML code’s button type is ‘button’ validation plugin doesn’t work. if I change this to ‘submit’ it redirect to the other page. Ajax conduct the answer before the validation! I tried beforeSubmit and submitHandler…..maybe I
Is it safe to make a POST request with JSON data using ajax?
I’m working on web application where I need to send some data using ajax with post method. So I have two choices to send data whether in JSON format or query prams. I’m confused which should I use? and is it safe to send data in JSON format? Answer As @lucasreta mentioned, if you use HTTPS, it doesn’t really matter
How to implement button disable function or other technique so that user does not log in twice? react, express
I am trying to prevent users from login in twice and creating 2 sessions (when they press log in button twice very fast). I am thinking of disabling button after it was click and the enabling it after approx. 2 sec in case there was an error e.g. “password incorrect” so that users can reenter their details and send form
Watch child properties from parent component in vue 3
I’m wondering how I can observe child properties from the parent component in Vue 3 using the composition api (I’m working with the experimental script setup). I want to understand how I can watch changes in the child component from the parent component. My not working solution is inspired by the Vue.js 2 Solution asked here. So I don’t want