Questions tagged [javascript]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], etc.
2,149,639
questions
1
vote
0answers
16 views
Sort aray of objects by another array of objects reference
I need some help to sort this data out, i have an array of products and i need to sort and display by settings configuration. The output must have the same order as settings array (index) and if ...
1
vote
0answers
4 views
How can I debug calls to window.open?
I have some React app here that has a malfunction that causes the page to open a new tab with itself. Recursive. and that is rather annoying as the number of tabs runs quickly into an out of memory ...
1
vote
0answers
7 views
Error 422 (Unprocessable Entity) mobile browser
Hi Guys my next JS app is working perfect in desktop browser by if i come in mobile browsers I get the following error
I am think that this could be related with the formData, this is my method to ...
0
votes
0answers
7 views
How can put my values to mysql from my php table with jquery ajax method
<div id="kutu">
<?php
echo "<table ' border='1' width='200px'>";
echo "<tr>";
echo "<th>#</th>";
echo "<...
1
vote
0answers
9 views
Leaflet: How can i show layer only inside a polygon
I'm working with leaflet.webgltemperature package and leaflet, so i need to put margin to it, because Webgltemperature uses the entire map insted of the section which i need to show.
so i though i can ...
1
vote
0answers
8 views
Realtime messenger app with Django and Cloud Firestore - how to send data to the frontend
How would I setup a server architecture to read/write from Cloud Firestore and update a single page in realtime?
Cloud Firestore has an on_snapshot method which listens to changes in the database ...
1
vote
0answers
7 views
Why I can't find a sub-string in the content from the tab in Chrome extension
I'm implementing a Chrome extension. Need to find a particular string on the active tab. But when I call "html.indexOf(stringToFind)" I get -1 instead.
Here are essential parts of my ...
1
vote
1answer
10 views
Vue won't accept the colon in my code after options?
import * as VueGoogleMaps from 'vue2-google-maps'
Vue.use(VueGoogleMaps, options: {
load: {
key: ''
},
installComponents: false
}
Vue keeps telling me that the ":" after options ...
1
vote
0answers
8 views
Angular - Disable Button
<div id="home-container">
<div class="sidebar">
<button mat-raised-button [disabled]="true">This is a button</button>
</div>
...
1
vote
1answer
19 views
How to style nested components in react?
I coded a table of content using nested components. Each component is a list of headers.
I want to style each component with an indentation effect (margin-left: "20px") to differentiate each ...
1
vote
0answers
6 views
printing json object content with nodejs
this is the code I use to save the scraped json data and save it, the exact same way it was scraped. The console.log result is from console.log(testObj).
However, if I console.log(testObj.name) or ...
1
vote
0answers
8 views
Mongodb Error codes and corresponding http status code
So, if a new user tries to sign up with an user account that already exists, MongoDb responds with a 11000 error code
In Express, that can be handled like this:
async function signup(req, res, next){
...
2
votes
1answer
18 views
JavaScript transform flat array to nested / grouped and sorted array
I am trying to transform an array of objects to a 'grouped' and sorted output array in JavaScript, preferably the ES6-way (e.g. using .map, .reduce, ...).
Summary:
array of objects
each object is an '...
1
vote
0answers
8 views
Ajax and SweetAlert won't wait confirmation to continu
I use nav-tabs, and I did a function to save (via Ajax) all informations every time you change tab, and I chose to put SweetAlert to confirm/inform that informations were saved.
Little issue is that ...
0
votes
1answer
14 views
React-router: How to resize header after navigating to new page?
I have a react-router application with a header component that takes up the full height of the page when at the '/home' path. When I navigate to a new path, '/foo', I need the header's height to ...