Category "javascript"

Remove punctuation at end of line in responsive text block

I have a list of a large number of Things divided by bars, i.e. Thing 1 | Thing 2 | Thing 3. They're in a responsive container and so I have no way of knowing w

Django : Uncaught (in promise) SyntaxError: Unexpected token < in JSON at position 0

Error When Click Button for send data. Please Helping me to solve problem. Error When Click Button for send data. Please Helping me to solve problem. Error When

How to read the user input on the client-side, modify it with JS on the client-side, and then POST it to the sever-side (Node.js)?

Problem: I want to read a user input on the client-side, do some processing on the variable using JavaScript, still on the client-side, then POST the modified v

How to send an email from JavaScript

I want my website to have the ability to send an email without refreshing the page. So I want to use Javascript. <form action="javascript:sendMail();" name=

How do I send fetched data from chrome extension background script to content script?

Once an event is triggered in my content script, it send a message request to the background script and waits for a response. content.js chrome.runtime.sendMess

How to paginate in react using inertia on laravel?

How to paginate in react using inertia on laravel? pulling the paginated data: $contacts = Contact::orderBy('name', 'asc')->paginate(10); return Inertia::ren

Pushing value to array that is the value of an object

I have the following structure: let mappings = { "1002": ["1000", "1003"], "2000": ["2001", "2002"] } and I want to add this piece of data const issueT

Infinity loops with useEffect and useCallback - Reactjs

somehow I got an infinity loop, the weird situation that I did solve it but I got a warning and I wish to fix the warning. this is code that work: import { Arro

Error $wpdb when use Ajax in Plugin WordPress

I'm a beginner in development and wordpress. I create a plugin to display a dynamic carousel with the help of the generator https://wppb.me/. So when I select a

How to use and load JS helpers in Stimulus controllers in Rails 7?

I want to import and use functions from my javascript/helpers/functions.js file in my stimulus controllers. I tried pinning it with: # importmap.rb pin_all_from

Camera not displaying after reloading app or running npx react-native start for the 2nd time

I have implemented tensor-flow camera functionalities for pose detection on a website and then hosted it on netlify. Link: https://uactivsite-mobile.netlify.app

Why does jQuery or a DOM method such as getElementById not find the element?

What are the possible reasons for document.getElementById, $("#id") or any other DOM method / jQuery selector not finding the elements? Example problems include

Javascript display ball with number when clicked

The below code showing that i click 4 times, the output like pic1 let sep = s.messages[s.player_at_the_table] == "" ? "" : "・"; s.messages[s.player_a

How to prepopulate name of the printer in the browser

I'm using ASP.NET MVC and I'm using a function with AJAX that opens in the browser the window to print. My questions is when I print I would like to already set

Shadowdom access form selenium javascript/typescript

I'm trying to get access to some shadow dom elements using selenium in Javascript/Typescript, but can't quite seem to get it to work as expected. I haven't bee

How to add a hover effect with dynamic styles to a component element?

I have this Angular component where hover effect is currently applied with pseudo-class :hover in .scss file. But I want to apply the hover effect with dynamic

How to optimise a condition which checks for each object of an array of objects whether specific properties are not undefined?

I want code optimisation for an if-statement because I otherwise have to add more key-value pairs into this condition with &&. I have an array of object

Synching validations between front-end and back-end projects

What do you do for synching validations between front-end and back-end teams in laravel? I read this post but I would like to know about laravel. I have also se

Typescript Function Arguement with Child/Inherited class?

I am trying to write a function that sets some properties on its arguments (not return a new object), the argument is of a class that extends from the same base

Flex direction changes when I use persist gate(next js with redux)

I am using next js and redux to build an app. When I use in my _app.js the flex direction changes in index.js, from row to column. No changes in the CSS or in