Dark mode beta

You’ve been asking for dark mode for years.
The dark mode beta is finally here.

Change your preferences any time.

Questions tagged [javascript]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). This tag is rarely used alone but is most often associated with the tags [node.js], [json], and [html].

Filter by
Sorted by
Tagged with
0
votes
0answers
6 views

How to use vue js perfect-markdown project inside nuxt js

I'm trying to use perfect-markdown using a plugin in nuxt. Y tried many ways. The last code that i have of my plugin is the following: import Vue from 'vue' import pmd from 'perfect-markdown' export ...
-1
votes
0answers
12 views

Save Button to store input text in JQuery

I have multiple input boxes - one for every hour form 7am to 4pm - and each input has it's own save button. How do I store the inputs in LocalStorage for every input box that I have? part of my HTML ...
0
votes
0answers
9 views

Can I use an input variable to start an animation in a child component?

I have an animation I want to execute when an *ngFor loop finishes ngAfterViewInit(): void { this.items.changes.subscribe(t =>{ Promise.resolve().then(t => { this.everythingLoaded(); ...
0
votes
0answers
8 views

ReferenceError: paypal is not defined when i setup PayPal Checkout using vuejs

I have a component PaypalButton.vue and when i implement my button following these instructions: https://developer.paypal.com/docs/checkout/integrate/# <template> <div> <div id="...
0
votes
0answers
6 views

why xaxis and yaxis ticks don't appear on axes in D3?

I'm using d3 v5 to create a data visualization of a three column CSV file. The code I've written for the axes draws the axes, but the ticks don't appear. When I directly input integers into domain, ...
0
votes
0answers
13 views

Exporting Mongoose methods in Node.js (TypeError: Cannot read property 'name' of null)

I've created a simple todo checklist website, where users can view "Today's" todo lists (on Home page), add new items to the list, create and delete other todo lists. All my code worked perfectly. So ...
0
votes
0answers
9 views

AngularJS - display a default option at the top of a dynamic select dropdown list?

Goal: Make a default <option> always appear at the top of a <select> dropdown when it's opened. I'm halfway to my goal. We have a dropdown that populates depending on whether other ...
0
votes
0answers
15 views

Multiple elements are sharing state in React hooks - how to fix

I have a component that is pulling in a set of data (array of objects with properties) and iterating through it so that it can be mapped to Cards in a Grid (both Material UI components). We're using ...
0
votes
0answers
20 views

How to get TikTok Profile Picture from javascript function?

I was wondering if anyone knew of code to set an HTML image to an image on the webpage. I was thinking like fiding the URL with the 512 width and height and returning the link of it. If anyone knows ...
0
votes
0answers
12 views

Can someone help me with combining my code?

I am trying to make a discord.js music bot. And i have a working play command. But i want to combine it with my other pice of code to make it check if it is an youtube url and if it isn't make the bot ...
-1
votes
1answer
19 views

How to check is today a working day (mon-fri)

I'm searching to method how to check is today a working day monday-friday. I'm using moment.js. I'm getting today date as moment()
0
votes
1answer
13 views

NodeJS from localhost to online site

I have a site that I created using NodeJS and one page html/jquery everything is working as expected on the localhost provided but I'm getting some issue in putting that site online www.xxxx.com, I ...
0
votes
2answers
16 views

Filter out array to get out unique values and populate a select dropdown box

I have an array that is coming from an API that can contain a combination of 4 different values: (none, A, B, C) That array is used to populate a select dropdown box. When I run the web app, the ...
0
votes
0answers
16 views

Getting a 404 not found error when calling API

I added Cockpit CMS (it's a self-hosted CMS) to my already existing project directory. I ran the install command, created a user, then a collection and finally the API key. Whenever I try to run a ...
0
votes
1answer
13 views

NodeJS application not waiting for response from MySQL database

I'm trying to setup a NodeJS application with GraphiQL API and MySQL database connection. All of it seem to work until I'm trying to get the data that was fetched from the database be available for ...
-3
votes
0answers
11 views

Javascript hook/event implementation to load html file from another server

so let me explain my problem statement first. I have a website, and I have a chatbot. The chatbot is basically html,css and javascript. I want that chatbot to be enabled on the website. The chatbot's ...
0
votes
4answers
29 views

convert array into given type of array of object [closed]

I have an array of type:- const arr = ['abc','def','ghi']; but I want this array in the form of const arr2 = [ {value: 'abc'}, {value: 'def'}, {value: 'ghi'}, ]; I am not getting the ...
0
votes
0answers
5 views

Problem with post like system in angular with firebase

I want to build post like system with angular and firebase.I like to get is some user liked some post. I have an likedd variable with true and false values, but it doesn't work.Here is the code: ...
0
votes
3answers
27 views

How can I do sum two time values in javascript

I've been trying to implement the function that sums two values as hours. "Example: 01:30 + 00:30 = 02:00" So I have this function below that works only if the sum of the two values is equal to a ...
-2
votes
0answers
10 views

Convert callback to promises [duplicate]

.then(fileEntry => fileEntry.file( file => { return this.uploadFile(file, url, headers); }, err => { console.log(err); throw err; }); }) Could someone please help me convert ...
-1
votes
0answers
12 views

Not getting localStorage data when page reloads in javascript?

I am coming to a problem where I have a calendar where user creates an event - when they create the event it shows on the calendar but yet when I reload the page it disappears. So, I created a cookie ...
0
votes
0answers
13 views

Is there a way to change Vue JS dragged items into the model to pass data

My view contains two columns where the items can be dragged. Is there a way to pass the value of dragged items into the method function or to data return array? This is my view which contains two ...
0
votes
1answer
15 views

How to display google map in reactjs inside of page height and width?

I am trying to put a google map on a after some description on page to start in a react project, and am having trouble. I have created google map in another component and calling that googlemap ...
0
votes
0answers
9 views

D3 V5 radar chart, different scales for axes

I am a really newbie to this subject, I am trying to build a webpage with D3 V5 with a radar chart. The only problem I have is that the axes of my chart need to be in different scales (but they need ...
0
votes
0answers
7 views

how to set open layer at a fix point

I tried to set layer at screen center,when i tried to zoom the layer it changes the position of layer.I tried many times but i am unable to set the layer in center.please help me to solve this problem....
0
votes
0answers
12 views

I want to determine active tabs by the current day in vuejs

I have 7 tabs in my vuejs page ,my purpose is to active the tabs by the current day , so if today is Friday then specific tab should be ctive on first load , But i got stuck and can't navigate to ...
0
votes
0answers
11 views

JS sortable with SQL from DB table

I tried to use JS sortable from https://www.kryogenix.org/code/browser/sorttable/, but it won't work on dynamic data I pull from SQL DB table. I downloaded this JS code and changed my code as below. ...
1
vote
1answer
14 views

How to programatically enable “-ms-high-contrast” media query?

I'd like to enable high contrast mode on my site and put all accessibility-related rules inside the high contrast media query: @media screen and (-ms-high-contrast: active) { /* All high contrast ...
-2
votes
0answers
10 views

Create new subdomain/filepath with javascript automatically? [closed]

Is there a way to add subdomains with javascript? I want to make a website that gives you your own subdomain or file path. Whichever works. Is there a way to automatically add a subdomain and what ...
0
votes
2answers
19 views

*ngFor does not display data even though the data is updated

I have an injectable service that retrieves shopping cart items: @Injectable({ providedIn: 'root' }) export class CartService { private readonly items: Array<{ product: IProduct, quantity: ...
0
votes
0answers
14 views

Drop-down does not getting re-rendered and can't set default value

As there is one Drop-down which brings Multiple Drop-down from the options selected from the first Drop-down. The multiple Drop-down default value is set. But as I choose any option from the selected ...
0
votes
1answer
10 views

i want to get some data from a json file and i got CORS error

i try to get the data from json and log it to the console and i got the cors error. function loadCustomer(e) { const xhr = new XMLHttpRequest(); xhr.open('GET', 'customer.json', true); ...
0
votes
0answers
8 views

formData append issue with laravel validation

I am getting validation errors, I have tried below code var FD = new FormData(); FD.append( 'title', "my title" ); FD.append( 'user_id', "20" ); FD.append( 'company_id', "30" ); ...
0
votes
0answers
9 views

Can icons be show for each item in a menu-radio dropdown?

I've just started evaluating w2ui, the Toolbar Menu Buttons in particular. In the code for the list items an icon is specified (as shown below in the demo code from that page) but the icons do not ...
1
vote
1answer
12 views

Intergrate puppeteer tasks into one single task

I created several javascript files which looks like this: const somedata = "" const puppeteer = require('puppeteer'); (async () => { const browser = await puppeteer.launch(); const pages = ...
0
votes
2answers
22 views

Angular 2 observable return type

In the below code what does this function return? what is meaning of Observable< Books[]> ? Is it like generics and collection in java? Is Observable a collection of some sort? function getBooks():...
0
votes
1answer
13 views

'serviceWorker' in navigator is false

Iam working on site which is running on http://local.mydomain.com (virtual host) And it gives me false when i check 'serviceWorker' in navigator So i cant test my service worker locally. Also i have ...
0
votes
0answers
9 views

Fade in View, conditionally fade it out, then fade in new View in its place

I fade a View in with a conditional, then fade it out. This is all before fading in another View in its place after a set timeout, something like this: this.state = { found: false, ...
0
votes
1answer
15 views

How to conditionally hide a field based on another fields value WITHOUT focus?

I have a form in which items in a list are added up, and once added to together, if the value exceeds 5000, then a form field with a white background should be UNHIDDEN so that the form displays an ...
0
votes
0answers
18 views

How to keep the Class Togggled after refreshing the page (jQuery) [duplicate]

Hello Guys How are you ? I'm working on project and I have a simple Question How to keep the Class Togggled after refreshing the page using jQuery ?? whenever you press the button it works fine, but ...
0
votes
0answers
12 views

MongoDB Nested Documents Aggregation using Change Events

The problem is that when I push a new document inside the array field it becomes a dotted notation. What I am trying to achieve is to filter the the response of the Change Event or the Collection....
0
votes
0answers
6 views

Angular Ionic Input Text with Dropdown Options to choose from

New to Ionic and Angular: I'm currently trying to implement a Input Text field that populates a Dropdown List whenever the user starts typing in the Input Text field. It should work like a search ...
0
votes
0answers
8 views

Decode Tiff Image Array Buffer to pixel data

I want to decode a 16 bit Tiff Image Array Buffer shown below and extract the data in 16 bits, which is pixel intensities in Java script Any library or decoder that can extract 16 bit tiff image to ...
0
votes
0answers
6 views

Tinymce 5 reports csp violation when preview feature is used

I'm trying to use tinymce with a Content Security Policy of script: 'self'. <meta http-equiv="Content-Security-Policy" content="script-src 'self'"/> The tinymce editor loads without any ...
-1
votes
1answer
35 views

Is there a way to use * inside of quesrySelector?

I have such selectors: i = 0; i < 24 ctl03_ctl00_G0_G1_0_0_0_G22_2_0_0_G23_3_GetShiftInput_ShiftButton_496_0_Editor_${i} As far I know I can substitute these 'random' sequence of letter and ...
0
votes
0answers
8 views

Vue PWA beforeinstallprompt, not called

I'm trying to display a button when the install prompt fires, however the prompt shows up as soon as I open the page and my button remains hidden all the time. I have declared the button like so &...
0
votes
1answer
18 views

React Router conditionally navigate to pages based on API call

Using React Router, I want to navigate to one of three pages, conditionally, depending on the result of an API call, but I am having trouble figuring out how can that be done. I have tried ...
0
votes
0answers
4 views

Kendo UI Removing date column causes grid not to populate data?

Following this example from Kendo UI's documentation I am attempting to recreate this to generate a dynamic grid. However when I remove the date column from the JSON object the grid does not generate....
0
votes
1answer
15 views

What's the difference between Blob objects and File objects in JS?

As said from the MDN Web Docs: The Blob object represents a blob, which is a file-like object of immutable, raw data; they can be read as text or binary data, or converted into a ReadableStream so ...
0
votes
0answers
6 views

Rails/JS - Update video source src after a delay

When someone uploads a video in my app, it gets processed in AWS Lambda which takes about 90 seconds. I want to be able to show this updated video without having to reload the Show.html.erb page ...

1
2 3 4 5
39728