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].
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 ...
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 ...
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();
...
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="...
asked 6 mins ago
Hazel
13188 bronze badges
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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()
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 ...
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 ...
asked 18 mins ago
SkyeBoniwell
4,40288 gold badges5353 silver badges106106 bronze badges
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 ...
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 ...
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 ...
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 ...
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:
...
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 ...
.then(fileEntry =>
fileEntry.file(
file => { return this.uploadFile(file, url, headers); },
err => { console.log(err); throw err; });
})
Could someone please help me convert ...
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 ...
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 ...
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 ...
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 ...
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....
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 ...
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. ...
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 ...
asked 35 mins ago
emix
10.3k77 gold badges3838 silver badges6262 bronze badges
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 ...
I have an injectable service that retrieves shopping cart items:
@Injectable({
providedIn: 'root'
})
export class CartService {
private readonly items: Array<{ product: IProduct, quantity: ...
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 ...
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);
...
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" );
...
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 ...
asked 41 mins ago
spring
15k1313 gold badges6666 silver badges138138 bronze badges
I created several javascript files which looks like this:
const somedata = ""
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const pages = ...
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():...
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 ...
asked 42 mins ago
K.Toress
18.3k44 gold badges5757 silver badges7676 bronze badges
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,
...
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 ...
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 ...
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....
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 ...
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 ...
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 ...
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 ...
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
&...
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 ...
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....
asked 54 mins ago
Arik
1511 silver badge66 bronze badges
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 ...
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
...