Category "javascript"

Why does `navigator.clipboard.writeText` not copy text to clipboard if it is proceeded by alert() on android

When trying to copy some text on chrome for android with navigator.clipboard.writeText() it works as long as I don't show an alert afterwards. The moment I show

How to get attribute of dynamically generated element ASP.NET

I know there are tons of questions on this topic and I've tried many of them to no avail. If anyone has any suggestions, it would be greatly appreciated. I'm tr

How can I access and process nested objects, arrays or JSON?

I have a nested data structure containing objects and arrays. How can I extract the information, i.e. access a specific or multiple values (or keys)? For examp

TurfJS: Efficiently locate the nearest point on a line string

Edit: The quicksort algorithm isn't actually working...😳 CODESANDBOX SITUATION I have a line string with up to 2000 points. I am trying to find the near

Google Picker API - showing only files user can share

I would like to use the Google Picker to choose a specific file from Drive, get its id and then share it with some other accounts using Drive API. The problem i

correctly create object with data

I have a loop where i iterate over the pixel data received from the method getImageData(). There I find the coordinates for each pixel (coordX and coordY). Then

Parse/Display nested JSON array with Jquery

I am looking to pull data from a job board API. I'd like to have headings for the departments (pulled from JSON level 1) and under each department the current o

Adding new line for image id to Crowd Elements Json output result

I'm creating an annotation-tool using the Crowd HTML Elements that let users annotate images with the bounding box format. The form looks like this:https://code

How can I re-distribute values within a charts.js pie chart when a legend item is turned off/on?

I have distributed the data across the pie to equal 100% in total ( I think lol ) please verify that's correct if you don't mind. But I want to be able to re-di

Python & Selenium: How to get values generated by JavaScript

I use Selenium in Python for scraping. I can't get values though these values are displayed on the browser. So I checked the HTML source code, then I found that

How to remove the selected data from saved data when we click on button in a selected one

In my application I have saved the data when we click on it(we can add the multiple data by entering some data and save the multiple data by clicking the save b

Text and images not coming through correctly for VUE 3 Javascript

I have been trying to get the text and images to display correctly on my Netflix app, I am using VUE.js 3 to achieve this, however, there is something wrong wit

Early return from a subscribe block in a function

I am new to JavaScript. I am trying to do an early return on error from a subscribe block. This is what I have public doSomething() { this.updateData(data)

How do I get the POST data from a netlify serverless function?

Here is the code for my server which works fine. I am trying to achieve this with netlify's serverless functions which I have pasted further below. CODE ON STAN

Stop cellRenderer to apply on all the rows in angular

I am trying to make a custom component in ag-gird which consists of two radio button. I wanted to make selection for each individual row, so I have tried both c

MS Teams Bot -- Is it possible to invoke a botMessagePreview from a task/submit activity as opposed to from a composeExtension/submitAction activity?

I am building a messaging extension in Teams that uses task modules and sends adaptive cards. I want to invoke the same task module from both a messaging extens

expected { Object () } not to be empty - WebdriverIO - POM - Chai

I am currently using WebdriverIO with POM and Chai expect/asserts. I have not been able to get my chai assert to work. expectChai(watchesPage.infoTitle).to.not.

how to store 16 bits buffer to PNG file using sharp.js?

I'm using sharp.js to create PNG images in node.js from a file containing a 16-bit RAW data map. fs.readFile(myFolder + "frame1250.dat", (err, buf) => { le

Trying to position searchbar in nav

I made a nav bar, and I'm trying to add a search bar to it, but I can't seem to position it. I'd like to have the search bar show on the right side of the nav b

How to set up the counter when it is detected

In my project, there should be a counter. I have used the "reveal function". I want the counter to start when it goes to "reveal function". And when the bottom-