Category "javascript"

Laravel insert dynamic input values with radio button

I am a beginner at Laravel, I want to insert a more dynamic address field to the database and I want to select one primary address using the radio button. I can

Play a video based on a value from local storage

I am aware that this question might have been asked here a few times, however I could not find a solution I've been looking for. We have a requirement where the

rotating a square on the click of a button in javascript

I made a program to rotate a square made with h1 tag on the click of a button. but it is not working. could anybody take a look at this code and say what is wro

Weglot js call works on chrome but not on Safari - can't figure out why

I'm new to js and jQuery so please forgive me if this code seems a little lost. I'm trying to hide/unhide Webflow classes based on the Weglot language selection

Why doesn't load data into my collection? mongodb

This is what appears on my mongo database: This is my app.post to insert the data, when I Submit it console.log the object with the dates but with create It ju

How to implement loginRedirect using vuejs and azureb2c and msal.js

I'm trying to implement an SSO using Azure b2c and Vuejs and MSAL, but I'm getting some issues. msalConfig: { auth: { clientId: "******dd03",

Zoom image in/out on mouse point using wheel with transform origin center. Need help in calculation

CONTEXT : My requirement is to do image transformations like scale, rotate and translate with user actions on an image. Rotation and translation of image is don

Declare new height and width for every new page on added jspdf using javascript

var doc = new jsPDF('px','px', [388, 2401]); var width = doc.internal.pageSize.getWidth; var height = doc.internal.pageSize.getHeight; doc.addImage(img, 'JPEG'

How to fix setTimeout() when appending to document

So I have a thing to show when a user is typing in my website but I want the typing... to show the dots slower rather than instantly right now I have my current

How to resolve act() in useEffect?

I have a small problem with act() error in react-testing-library. In useEffect I try to call an function that is a promise. Promise returns some data and displa

AJAX - How can I build a notification system, that is constantly getting updated, without slowing down my website too much?

I am a beginner to web development, and I am trying to do a notification system with AJAX and jQuery. In my web application, I have a comment system where you c

Cocos Creator JavaScript the callback function of cc.resources.load not work

I used cc.resources.load() and modify the value of parameter in properties, but it doesn't work when I read the value of parameter out of callback function. Is

How to Give List of Objects IDs and add a click event based on each List IDs in Django

Here in my Django code, I have a list of prices. Now I gave them unique IDs which works well, but when I try to add a click event, the click event only works fo

arrayForEach was called with a non array value. Google Calendar

I am trying to get events from my Calendar. I walked through all tutorials and searched through internet, but it seems like i am the only one who get the error.

How to make a method that finds every object by id in angular

Please help, I want to make a method findChildByIdInShop(shop:any, childId:string) where the shop is any JSON main node that has children with Ids. Simply, how

How to check if an element exists on the page in Playwright.js

I am using playwright.js to write a script for https://target.com, and on the page where you submit shipping information, it will provide the option to use a sa

How to convert base64 color image to grayscale image using javascript

can I know how to convert base64 color image to grayscale image using javascript? I'm using the Cordova camera plugin to take pictures and need to save base64 d

Fill PayPal order script using onOpen() function

I'm trying to implement the PayPal SDK on my site, and thought this should work: <body onload="writeOrderCode()"> The JS file with this function was load

Button onclick not Working Till Page Reload

I have A Very Small Application That add tasks to the page and save it to local storage so if i reload the page or close it everything will be at its place, the

How do I make a command in Discord bot in js that insert data in a database with Sequelize?

I'm working on a Discord bot using node.js modules and Sequelize to database, and I want to add a command that users type and the bot registers them in database