Category "javascript"

layouts\default.vue will be reset after I restart the nuxt.js server

I'm currently trying to learn vue.js on the nuxtjs server in the localhost:3000. I have found out a problem that whenever I create a new "xxxx.vue" file in the

I am trying to store form values in local storage on submitting form. now i want that all input tags should be cleared once i clicked on submit button

var formHandle = document.forms.infoForm; formHandle.onsubmit = processForm; function processForm() { var formName = formHandle.f_name; var formCol

Discord.Js Bot to create invites for users

I need to figure out how to create an invite link for users so that they can track invites. Currently I have this, however this created the invite for the Bot.

Request Body Missing in Spring while updating using PATCH API in react js

Spring shows - Resolved [org.springframework.http.converter.HttpMessageNotReadableException: Required request body is missing: public com.cg.bookstore.entities.

Can't connect Redis with Heroku

I'm kinda new but what I did so far was the following: Created Redis cloud account, set it up on RedisInsight on my computer. Heroku was fully deployed, went to

javascript canvas wont render with custom framework

I am making a simple JS game framework and I am trying to make an image that can move around canvas with WASD. The code below should render a movable image but

why i have to refresh/rewrite my code to make it work while trying to save the state for a specific user in react native

I am trying to make a test sheet for user. If he passes the test, he is directed to a pass screen and even after totally closing the app, when that specific use

Telegram Web Bots data validation in JavaScript

I've tried to do user verification script for telegram web app for bots. I have no idea how to fix it. import sha256 from 'js-sha256' const telegram = window.T

How to use BootstrapVue's layout and grid system to arrange these checkboxes?

I have a BootstrapVue table like this; Here's the code for the table; window.onload = () => { new Vue({ el: '#app', computed: { visibleField

How to use this keyword inside eval in javascript?

Having this: const person = { name: "James Smith", hello: function (x) { console.log(this.name + " says hello " + x); } } function newContext() { t

Why does the canvas have a black background?

Why does the below canvas have a black background? Because of it, the text behind the canvas is not visible. I need it to be transparent to show the elements be

User defined renderer object causes a TypeError - marked.js

Right now I'm familiarizing myself with marked.js. I want to add html attributes to the elements that are rendered when marked.parse() is called. In doing so a

Transform array into object with custom properties

I have this array myarr = [ '=title1', 'longText0...', 'longtText1...', '=title2', 'longTextA...', 'longtTextB...', 'longtTextC...' ]; symbo

Props object not working on mounted method

i have preFile variable whitch is coming from props and i am changing on mounted method but when i try to use preFile to pass fileProcess method, for is not not

Django and Axios Forbidden (CSRF token missing or incorrect.)

I am having issue with my django server when trying to connect it to axios. It should be a simple fix but I am stuck! I am getting this error from my django ser

Updating a Dropdown Based on the Selection of Another Dropdown - replaceWith Not Working

I have a couple of drop downs, when a venue is choosen from the first one, it should populate the second drop down with floor values. Using jQuery AJAX I am abl

Cannot update a component while rendering a different component warning

I am getting this warning in react: index.js:1 Warning: Cannot update a component (`ConnectFunction`) while rendering a different component (`Register`). To l

How to get target who are touching on a specific sprite

I am trying to make a mini-game by phaser.js. In my idea. A sprite object can collided to a static sprite and continually perform desired effect if they are sti

Configuring Jest with Rollup and Typescript

I created an app within a monorepo (Lerna) using yarn workspace. The architecture of the app is as follow: my-monorepo ├── node_modules ├

Validating Firebase Auth tokens manually

I'm trying to use cloudflare workers to perform authenticated actions. I'm using firebase for authentication and have access to the Access Tokens coming through