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

How to pass a JS variable via AJAX to python (Flask)? [duplicate]

This question already has an answer here:jQuery posting JSON 3 answersHow to get POSTed JSON in Flask? 4 answersI am trying to pass a js veriable via AJAX to my flask app. Like...

View Article


Show an alert client side when a promise is rejected server side

I'm not super familiar with promises, but I have a few that I'm implementing within my code and would really like an alert to appear from the client side when the promise is rejected.Here is the socket...

View Article


Specify the Jest Test Directory in VS Code

I'm using the jest-test-explorer with the test-explorer-ui extensions in VS Code and have a directory unit tests/ and another acceptance tests/. The test explorer sidebar shows and runs the tests in...

View Article

How to install this related posts code to Blogger Contempo theme?

I just like to ask how can I run this related posts script to my Blogger blog using a Contempo theme? I run it using add HTML/JS gadget and it showed a related post link but no posts underneath it....

View Article

Image may be NSFW.
Clik here to view.

Capture Array Values from Dynamic input Fields using Javascript

I'm trying to get the value from dynamic drop-down list in my form, but my code isn't working.View.php<div class="input_fields_wrap"> <input type="button" class="btn btn-info add_field_button"...

View Article


Node esm package

I just found about esm and would like to use it. I have a package which uses babel and transpiles code to lib folder on pre-publish hook#!/bin/bash NODE_BIN_PATH=node_modules/.bin; rm -rf ./lib;...

View Article

Leaflet - equivalent of eachLayer() for L.GridLayer & L.VectorGrid.Slicer

Is there a way to replicate the behavior of L.LayerGroup.eachLayer() with GridLayer? I'm using Leaflet.VectorGrid (L.VectorGrid.Slicer) in order to wrap some GeoJSON around the world, and I'd like to...

View Article

Reactjs component in an external js file does not load sometime

I have created a very basic ReactJs component. I created an html file. Code is below<!DOCTYPE html> <html> <head> <meta charset="I`enter code here`SO-8859-1">...

View Article


webgl does not draw texture?

I develop my project with webpack, when I run in development mode and production mode I see texture my canvas. My production page a bit big. And other things are drawed correctly. when I try to more...

View Article


Using Vue how do you call a function when a user clicks on a...

I have multiple selectpickers in a vue component when a user clicks on an option I want to call a function passing in an id<tr v-for="(content) in searchResults" v-bind:key="content.id">...

View Article

three.js Box3.min and max localToWorld

I am just stuck right now. i have several Vectors (Vertices) which are parts of bigger objects and i am generating two Box3's with it: obj1box = new THREE.Box3().setFromPoints(buffer1); //buffer 1 and...

View Article

How can I do Shallow copy of tree using recursion

I'm trying to copy the Tree which one has value, children[], addChild(), map(callback). Passed all test about addChild() but not on map(callback). I'm using Jest and code is like bellow.The method...

View Article

pass forwardRef via cloneElement reactjs

const ref = useRef() React.Children.map(this.props.children, (element) => { React.cloneElement(element, { innerRef: node => ref, }) }) here element is a componentlike the followingconst...

View Article


Right align an absolute positioned element to the edge of its ancestor

I have an absolute positioned element that's already anchored to its direct parent. My current design spec requires a couple of these elements to right align to the very end of the ancestor container....

View Article

Protractor is giving 'Failed: The value of "value" is out of range.' while...

I am trying to upload some files in an input field using the following code: let absolutePath = helper_files.resolvePath('../../${file}');...

View Article


ShowHide (shID) to show only one div at a time?

I'm currently working on a Bootstrap website. I'm new at jquery and Java, so I can't figure how to do this. I have something like this: http://jsfiddle.net/PVLMX/2/function showHide(shID) { if...

View Article

Image may be NSFW.
Clik here to view.

How to set state before render with react(redux)

I want to make a component able to redirect when not loggedIn. Components were made with react, checking auth function works well with redux. //App.js class App extends Component { checkUserInfo ()...

View Article


Angular 8 wait for rest api response in subscribe

In component.ts i have this method which is calling api and working with response. I am getting an empty array as it is not waiting at subscribedisp(): String[] { let scores: String[] = [];...

View Article

Undo/Redo Grouping in HTML/DOM Documents

I am coming to the conclusion after some investigation that undo/redo grouping (*) in, say, textareas, will be broken by any modification to the document. 1) Is this really the case? Is this 'spec'...

View Article

Auto click when user scrolls to the end of the page

I'm trying to create an infinite scroll feature on my site but it isn't working. My code:var post = {} post.load_moreBtn = $('#home_load_more'); if($(window).scrollTop() + $(window).height() ==...

View Article
Browsing all 138134 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>