Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Browsing all 138221 articles
Browse latest View live
↧

Does Jest swallow console.log statements? Is there a way to change this?

Does Jest swallow console.log output?// __tests__/log.test.js it('logs', () => { console.log('hey') // expect to see "hey" printed in terminal }) // terminal output $ jest --forceExit PASS...

View Article


Send XMLHttpRequest When User stops writing

I Just want to send request when user stops writing... i seem to have stopped extra spam by (str.length > 3) this. But What i need is when user stops writing this script gets the input value and...

View Article


Image may be NSFW.
Clik here to view.

How to use jQuery ajax to check if file exists in JS array?

I have an array urlResult which collects the href attribute of all a elements on a component. Looks like:All I need to do is use jQuery $.ajax() method to check against those URL's and in each callback...

View Article

How to make a generic request service in Angular8

i've created an generic request service but it keeps returning 'ZoneAwarePromise'. I've tried to use .pipe() and .subscribe() to try to retrive the content of the request, but it's not...

View Article

Does passport-jwt introduce any security advantages, over a "standard" JWT...

I've reticently built some login and authentication functionality for our Express-based RESTful API. The authentication middleware looks like that: const Login = require('../services/UserLogin');...

View Article


Looking for cleaner declarative way to reduce nesting with spread operator

I don't like using map and looping to create a new array from an old array in JavaScript when just one item changes. I have a simple array that has data like this:const speakerData = [{name: 'joe',id:...

View Article

Meta Refresh and redirect to parent

The script works fine however it was redirected inside iframe I really want to work it outside with iframe, so basically after 3 seconds it will redirect and get out of iframe any idea how to achieve...

View Article

Can I use the 'index' argument in 'v-for' nested in a 'method'?

I need to use index on a v-for but on the on the same level as thedirectiveitself in order tomutate``` the state being shown.<template> <div> <div v-for="share in...

View Article


Python Web-scraping, How to click 'Next' using Requests-HTML library

I'm trying to get the data from "https://fortune.com/global500/2019/search/" using python requests-html module. I'm able to get the 1st 100 items (from 1st page) because the page have javascript...

View Article


Image may be NSFW.
Clik here to view.

Cookies are not saved when sending via the post method

I create an online store for a diploma project, I log in with a username and password, write the user's name and surname in the cookie, they are read, and then become unavailable. I thought the problem...

View Article

Jquery image gallery with next and prev buttons

I've made an image gallery with jQuery (click on image and it appears big onscreen). I wanted to add a 'next' and 'prev' button to switch from view, basically replacing the src attribute from the image...

View Article

count button pass the current page URL with pure javascript Ajax to the php...

I try to pass the current page URL (window.location.href) with pure javascript Ajax to the php variable$_REQUEST['url']. what am I doing wrong?Counter.js:'use strict'; let clicks =...

View Article

regex html file href/src url pattern

Building an Electron app which gives you all colors of any website.For that, the app downloads the url (like http://youtube.com) and saves it as html. Now the app reads the html file and searches for...

View Article


Image may be NSFW.
Clik here to view.

es-lint is throwing a warning for ```There are multiple modules with names...

I checked all my import statements and they seem to be fine, the only odd import I have is react-bootstrap and I import it as import { Jumbotron, Button } from 'react-bootstrap';to use the Jumbotron...

View Article

Vue & conditional rendering with template tag

I am trying to follow documentation:https://vuejs.org/v2/guide/conditional.htmlBut for some reason my template is not working as expected, as soon as I put <template v-if="variable"> vue fails to...

View Article


Fetching Async TreeView Data

I'm new to react and I'm building a TreeView component in react where I fetch data as nodes are expanded. I'm using the TreeView from Material UI: https://material-ui.com/api/tree-view/I have created...

View Article

jQuery why is $(this) in callback function "window"?

I was about to make delete button for my to-do list code. this is my code in <script> var del = $("<ion-icon name='trash'></ion-icon>").click((e)=>{ var p = $(this).parent();...

View Article


Compare 2 arrays from objects and create a new one [duplicate]

This question already has an answer here:How to get the difference between two arrays of objects in JavaScript 12 answersThere are 2 arrays with objects. I need to create a third array from them, into...

View Article

i want to close Browser, mean to exit the browser on page load

i had made a script for qr attendance, when qr code scanner scan the code user goto link and attendance auto posted, but i need that when users attendance posted then browser should close...

View Article

Axios ajax, show loading when making ajax request

I'm currently building a vue app and Im using axios. I have a loading icon which i show before making each call and hide after.Im just wondering if there is a way to do this globally so I dont have to...

View Article
Browsing all 138221 articles
Browse latest View live