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

Google maps marker not showing up API v3

The marker isnt showing up, i read the docs but i cant find the problem, can somebody help me plz?heres the js:function initialize() { var mapOptions = { center: new google.maps.LatLng(-8.064903,...

View Article


React leaflet- how to add custom components with useLeaflet

I am trying to create an info panel for my leaflet map like so: leaflet-info-control. Furthermore I use react with react-leaflet. To access the global leaflet map object, react-leaflet provides the...

View Article


Find out if an element is a descendant of a specific element type? [duplicate]

This question already has an answer here:How to check in Javascript if one element is contained within another 9 answersWhat is the best way to find out if a given element (targetElement) is inside of...

View Article

How to access a full array retrived from firebase database in react native?

REACT NATIVE CODE constructor(props) { super(props); this.state = { day: '', month: '', year: '', asked_dat: '', asked_clas: 'CLASS', asked_su: 'SUBJECT' }; } set_date = () => { this.setState({...

View Article

Javascript For Google Spreadsheet

Here is a screenshot of the "Key-In Data" sheet I am trying to work with: key in data sheetAnd here is my code:function myFunction(){ var app = SpreadsheetApp; var activeSheet =...

View Article


Laravel Puppeteer Browsershot check if div is isset

I'm trying to create an automatic screen capture system. But i have some problems.On the page where I try to take a screenshot has Select Option. But this Select Option sometimes knows to be sometimes...

View Article

How to add pagination indexes with jQuery

I have a bootstrap table from an array and custom pagination. Pagination shows per 3 rows in table, I have buttons next and previous that works nice. Now I want to insert indexes between prev and next...

View Article

Cannot get Jupyter notebook to access javascript variables

I have a website that performs file format conversions, and this service can be used by other websites via the window.postMessage system. It would be great if one could do this also via a Jupyter...

View Article


Sending and getting data from API

So i have created a rest api in nodejsi have the get request function like this:server.js const search = 'example' //user input search variable changes based on input from html file...

View Article


How to merge two getjson response into one variable and then process that...

I have getjson for page1 but I want to do same thing for page2 then process the sitecontent variable further. how I can make two getjson request one for page1 and one for page2? (I want to merge the...

View Article

Mongodb - Express, how to get the "id" properly? It gives an empty [Object,...

I am trying to build an application with MERN stack, here is my Item model:const Item = require("../../models/Item"); const mongoose = require("mongoose"); const Schema = mongoose.Schema; //Create...

View Article

Sorting Data Fetched Asynchronously with Javascript Fetch API

The following javascript function called runQuery was given to me by @Brad It gets data from a NodeJS server using the fetch API. It works great! It returns data from the server. Now I am trying to...

View Article

Parsing date YYYYMMDD'T'HHmmss.sss'Z'

Let's say that I receiving a date from api in format: 20191116T202021.000ZBut unfortunately I'am not able to parse this data in javascript: var dateToParse = "20191116T202021.000Z" var dateFormat =...

View Article


Javascript - pass variables to a url

I am trying to pass some form variables to populate a url. As long as I have only one variable, the script works. As soon as I start adding more than one variable, it breaks and the button does not do...

View Article

How do I append data to a JSON File (Involves: Discord.js, JSON)

I have a JSON File: (invitelist.json){ } Every time the "guildMemberAdd" event gets fired off, an invite is created:bot.channels.get('642609367195189268').createInvite({ temporary: false, maxAge: 0,...

View Article


pass multi variables from php to javascript file externally

here is my php file<?php require_once __DIR__ . '/../../core/FbChatMock.php'; if (isset($_POST['id'])) { $userId = (int) $_SESSION['user_id']; $id = htmlentities($_POST['id'], ENT_NOQUOTES); $chat =...

View Article

Why is passing function in parameters of another function is giving...

Please find the code below whenever i am trying to run this one it's giving some random integer value why is that . Can someone explain what is happening in the output.let user = { name: "John", sayHi:...

View Article


why the REST API as a body gets undefined?

I writirng server in Express to posibility GET and POST. In Insomnia I get and post valid data.This is code my REST.const express = require('express'); const app = express(); const port = 3000; var...

View Article

Can I simplify this script that simply adds a script to the DOM?

I used this as a starting point, but realize it depend upon a div being present.Curious as to wether or not I can just use appendChild to append the script directly to document.body?// loads a script...

View Article

Table from fetched URL clickable array (or to variable)

I'm new to javascript and trying to achieve one thing. I have on my site's table with TD's fetched from API URL by code bellow, with the result as on the image below. What I'm trying to achieve is to...

View Article
Browsing all 140248 articles
Browse latest View live


Latest Images