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 am recording audio from microphone of the user with MediaRecorder and using Navigator.getUserMedia.
getUserMedia({ audio: true })
.then(stream => {
this.stream = stream;
const mimeType ...
I currently have an object type="text/html" in my GSP displaying a Jenkins Blue Ocean. I want to be able to track which one of my users clicked "proceed" or "abort", but because these buttons are part ...
I'm trying to create my own API using Spring Boot, which for now uses access to external data from an air quality API.
I have a CityInfo entity:
@Entity
public class CityInfo{
@Id
private ...
am doing a school project to pull out various Origin place IDs to a user defined destination PlaceID.
I have leveraged on the Google Developer Platform Help to understand however am still having ...
On www.mypage.com i have an iframe with www.search.mypage.com. Both parent frame and iframe have a GTM container I have access to.
When a search is made in the iframe, the iframe GTM container sends a ...
I am making a table base on react-table v7 and react-window. I found other question on this site with the same question but almost they are using v6 - almost difference.
Problem is the filter text ...
Say you have an object obj = { a : [1, 2] } and you create a clone of it objClone = Object.assign({}, obj) and when you modify Object.values(objClone)[0][1], then the parent obj is also modified. Can ...
I have a translation json file with the following translation:
"pageNotFound": {
"description": "The page could not be found. Click {{link}} to return to the home page"
},
The link variable I am ...
asked 10 mins ago
Sisky
38544 silver badges1818 bronze badges
i need that generic of Array has been extended from my class.
How to do it properly?
export interface DeliveryMethod {
readonly id: string;
readonly company: string;
readonly cost: number;
...
I have a Table On COVID 19 Live Update, Now I wat to Keep Blank Cells where the Value is 0 & Show + before Other Number, What to DO?
I've seen Copy data into v8::ArrayBuffer which is able to create an array buffer based on data like the following:
QByteArray data_buffer(file.readAll().data(), file.size());
v8::Handle<v8::...
asked 13 mins ago
bluejayke
1,52422 gold badges1212 silver badges2525 bronze badges
I want to proxy my /api requests from this React app to 'localhost:3000'.
My React app is running on 'localhost:8080'.
I used setupProxy.js for another project using CRA but this project is not using ...
I am watching a inLearning course and attempting to follow along the code myself. However the code does not seem to be working in any browser. As I am brand new to coding I am not sure what is causing ...
I have a table full of rows that have <form> tag inside them and have <input> tags inside cells as shown in the below markup.
<table style="width:100%">
<tr>
<th>...
I have data like this:
let objData = [{
"product_client_id": 24,
"product_type": "VIRTUAL"
}, {
"product_client_id": 24,
"product_type": "VIRTUAL"
}, {
"product_client_id": 86,
...
TS
dataArr1 = [
{
id: '1',
name: 'Room1',
spinning: true
},
{
id: '2',
name: 'Room2',
spinning: true
},
{
id: '3',
...
asked 26 mins ago
Panda
17988 bronze badges
I would like to get some help adding a toggling effect to this code. My (if) statement functions well and the statements within it are executed perfectly. But when the (svideo_one) element is clicked ...
I have a simple code prune message code. but I want to improve it
const number = args[0]
let messages = await message.channel.fetchMessages({
limit: number
});
let message = await ...
I am trying to build a Single Page Application using vue(client) and Java Spring REST APIs(backend). I need to secure them using OpenId Connect. The OpenId provider is RapidIdentity. This provider ...
This is my very first JavaScript project. What I am trying to do is when user enters there name for example "Blake" It will output "Bravo Lima Alpha Kilo Echo". So whatever user inputs it outputs ...
I have three multi-select drop-down lists on the selection of items from these lists I want to show the item data text filed in a textarea with comma separation like item1,item2,item3,etc. Currently ...
I am writing a JavaScipt application and am attempting to fetch data from a certain URL but am getting an undefined value. The expected value after fetching and converting it to json should result in ...
Given there are two ways to write the code, which way is better in terms of effective code?const { match: { params: { clientId = '' } } } = this.props;const clientId = this.props?.match?.params?....
Sorry if this has been asked already but I'm pretty sure I'm close to the answer, and would appreciate a little help. The problem is getting the data object inside an array. example data: [ {x:value,...
I have below:
<asp:Chart ID="Chart1" runat="server">
<Titles>
<asp:Title Name="Title1" Text="" Alignment="TopCenter">
</asp:Title>
<asp:Title Name="...
Set up my code and I'm fetching results.
I am use the nodejs googleanalytics library and authenticating fine
await googleAnalytics.data.ga.get({
'ids': `ga:${accountId}`,
'start-date'...
I have create a custom HTML page for Find Existing Location analysis following this link https://developers.arcgis.com/javascript/3/jsapi/findexistinglocations-amd.html#event-job-submit
I am able to ...
New to firebase and JS!
I have multiple HTML files that deal with different courses a person can take and are all formatted in the same way and one javascript file that all the HTML files use. ...
I'm going to return type_item to Client-side, but i can't return Mongoose results to variable type_item[i].items, it return nothing...
How to return results from getting mongoose data to type_item?
...
I tried to use identifyChildNode() function to differentiate the children and parents,its not working and any other logic would be helpful
parents and children keys both indicative of having children ...
Disclaimer: I am familiar with web technologies but still a newbie.
Scenario: I want user to choose an audio file from local file system. Then I wish to show a small audio control on the webpage to ...
I have two function, the controller and the service. Here is the service code.
const getVersion = async (type) => {
const version = await Version.findOne({ TYPE: type }, { _id: false, VERSION: ...
I have no idea why I'm not able to parse this JSON file in JS using RequireJS.
var settings = require('https://api.jsonbin.io/b/5e9535d3634f8d782606be53');
var parsed = JSON.parse(settings);
...
Please see the following code. Do we have a convenient method to overcome this?
interface IAnimal {
type?: "animal" | "bird";
body?: {
legs?: number;
};
}
// validate type and body.legs ...
asked 1 hour ago
Wajahath
46966 silver badges1212 bronze badges
I am trying to write a function that I can reuse to make different fetch requests in my react app. But I am getting unexpected null value and the order in which the function is executed is confusing ...
asked 1 hour ago
Tamjid
4911 silver badge77 bronze badges
I am trying to send get request to a URL on my server (IP filtered. for the sake of the example {{computer.id}} is 1) - sender
$.ajax({
url: "http://192.168.1.181:5000/computers/{{computer....
I am using puppeteer for web scraping. The code I currently have grabs the title of every product on the page and stores into an object variable. Here is the code I currently have.
const puppeteer = ...
var randomNumber = Math.floor(Math.random() * 6);
var attempts = 0
var maximum = 3
while (attempts < maximum){
document.getElementById("submit").onclick = function() {...
I have a modal wrote by
$(document).on('click', '.generate-modal-button', App.proposals.elementClickHandler);
function elementClickHandler(event) {
event.preventDefault();
$('#state-modal')....
I learned HTML5, CSS3, (a bit of) JavaScript and jQuery for 5 months, and I have got my portfolio website: http://dauhn-kim.com/portfolio/
During the course, I got to have more interests in coding ...
In an event handler when getting data from localStorage and assigning this data to state variables, component is not re-rendered to reflect new values
The logic is that to verify if localStorage ...
asked 1 hour ago
user615274
2,41511 gold badge1919 silver badges2828 bronze badges
What I want to achieve.
Generate hashed password on PHP server side using password_hash() and store it in Data Base.
Send a hashed user password from html/JavaScript page to PHP script.
On PHP side ...
I hate to do this (share the whole code), but I feel like I have no other choice. I have been banging my head against the wall for the past two days. It is one issue after another. Currently, I am ...
The following html code creates several markers and popups for them. ... is just a replacement for long things which I've ommitted as they don't have significance in solving my problem. As there are ...
asked 1 hour ago
novice
38533 silver badges1313 bronze badges
i have problem with my login page.
where i should set default my email phone number and pass to my login page so if i use email : abc@gmail.com, phone number 08123456789 and pass 123 only can ...
In my Angular 9 application, I've created a separate admin routing module and calling it in app.module to initialize. But the routes for the components like login and signup are not getting called nor ...
I have a object array and would like to get key and value by iterating though it, however I only get 0, 1 as index. anyone know why?
const vairable = [{key1: "value1"}, {key2: "value2"}]
Object.keys(...
asked 1 hour ago
jacobcan118
1,77711 gold badge1515 silver badges3232 bronze badges
Here is the brief snippet of my functional component's render method(removed unnecessary code for brevity)
return (
<Draggable draggableId={id} index={index}>
{(provided, snapshot) =...
I am new to Node.js asynchronous programming. Question: If calling async / await or nesting callback functions will make your asynchronous code become synchronous, why do we use them in the first ...
I'm using generic Stdin-Stdout "Example.bat doc1.txt /r /o doc2.txt" batch file and switches and want to include both a RegExp replace function with a RegExp match function using the same operator ...