Category "javascript"

How do I make my code write messages to the terminal?

For an assignment I need to make a chat client in the terminals, but my code won't write to the terminals. I believe it might have something to do .write not wo

React-Native: How to open google play store from react native app?

I am trying to find a way how to open the google play store with my application when the user is pressing a button inside of the react-native application. Is th

ElectronJS - sharing redux store between windows?

I have an electron app based on electron-react-boilerplate. Now, that I have one window running as I wanted it to run, I started to create a new window. I cur

How to build expo apk using eas build

After updating expo it no longer supports building apk files using expo build:android -t apk and instead advices to using eas builds using the command eas build

Difference between Localhost and opening html file

What is the fundamental difference running a file using a server in localhost, and opening a file such as file:///Users/$user_name/$your_directory/index.html, a

Confirm popup working fine but not delete the item in .net core

public async TaskOnPostDelete(int Id) { var book= await _db.Book.FindAsync(Id); if(book == null) { return NotFoun

How to use MUI in Redwood JS?

I want to install MUI in the Redwood JS. But when i ran the command in the project directory yarn add @mui/material An error popped up in the console saying er

Adding items to the same datalayer object after page load

On my site, I have a page object that contains multiple bits of information about the page that is currently being viewed that I want to push to the datalayer.

Is it possible to save form data to a data file on the local computer and then reload that text file back into a form to select those same items?

I have a rather extensive form that I use to create a 3-4 page report. There are times when, for one reason or another, I can't complete and submit the form to

Type text into a React input using javascript (Tampermonkey script)?

I'm trying to make a Tampermonkey script that'll automatically enter text into some form input fields. Normally, you can do this with just: myElement.value =

NextJS: Main and Nextscript

Exploring NextJS a bit for its server side rendering features. It looks really nice and easy to use. I already explored the _document.js file which we can inclu

Named export and default export in the same file

I am trying to put default and named export in same file. Example: // file name : utils/fetch export default fetchUtil; module.exports = { fetch : fetchUt

Firebase V9 - Custom 'Doc ID' Upon Creation (Javascript)

Im wanting to create a doc in Firebase Firestore with Javascript... That doesn't just have the automatic generated ID return addDoc(collection(db, "users"), { b

Bootstrap date time picker

I am trying to implement the date time picker as explained here https://eonasdan.github.io/bootstrap-datetimepicker/#minimum-setup, I have downloaded the js fi

When does server side validation run? When does client side validation run?

I am a student learning PHP. To my knowledge and from tutor's comment, I guess the tutor said that server side runs before and client side after. So when i che

Nested if statements vs &&(or) operator

I've been trying to solve this https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/profile-lookup/ with the following code

firebase signOut() method doesn't sign out

I use firebase v9 and created a react hook for convenient verification of user authorization. After authorization, I can't log out on the page as if the signOut

How to solve async-await function problem while using Axios?

I want to use axios using async await function. But when I use async await function then I get an error. useEffect(async() => { await axios .get("

How to get formaction in submit event?

Having a simple form with two submit buttons, how can I get the formaction attribute in a submit event? HTML code: <form id="FORM" action="/original">

Change variable in array or list

I'm trying to change second element in my array using loop in this way: myTab = [false,true,true]; if (trueOfFalse){ for (let i = 0; i < myTa