Questions tagged [javascript]

JavaScript (not to be confused with Java) is a high-level, dynamic, multi-paradigm and weakly-typed language used for both client-side and server-side scripting. Its primary use is in rendering and performing manipulation of web pages. Use this tag for questions regarding ECMAScript and its various ...

0
votes
0answers
5 views

javascript render canvases of dicom files in a loop [duplicate]

I need to render a list of dicom files into canvases using cornerstone.js. I downloaded some examples provided by cornerstone to test and everything works fine. Here is what i modified to test ...
0
votes
0answers
6 views

How to track links with jQuery and post it to server without cancellation while redirecting?

We are building our tracking tool, and we want to keep track of the CTA's on our website.Here is the code for that:<script type="text/javascript">var $=jQuery; $("a").click(...
1
vote
1answer
17 views

How to call a function by pressing enter key in html using javascript?

var input=document.getElementById("search");function showTrue() {document.getElementById("output").innerHTML="It's true";}function showFalse() {document.getElementById("output")....
0
votes
0answers
5 views

How to reference firebase pushId key?

I have the following code and I'm trying to use the firebase key in the "upvote" function, however, It will not allow me to reference "key" in "upvote". My question is, since the other functions such ...
0
votes
0answers
12 views

excel download issue through XMLHttpRequest

I have a button for downloading the excel sheet. It works fine in my local development server, but it's not working in the live server.Jquery:$(document).on('click','.export',function(){var ...
2
votes
2answers
26 views

How to scramble a sentence in Javascript preserving space location?

I found an script that will shuffle the string:String.prototype.shuffle=function () {var a=this.split(""),n=a.length;for (var i=n - 1; i > 0; i--) {var j=...
0
votes
0answers
7 views

Use JSDoc document function return value type based on parameter type [duplicate]

For example, I have following function. I want document the function would return string for Node, but string[] for Node[] and NodeList. How should I do that?/*** @param {Node|Node[]|NodeList} ...
1
vote
4answers
44 views

jQuery addClass is not working inside for loop

I have a jQuery addClass function in a loop that I can seem to get to work for some strange reason, it supposed to paint my Font Awesome star golden. The loop works with no issues, I tested it to ...
0
votes
0answers
12 views

D3JS chart: Hovering on some transitioning elements while others are still transitioning too stops the execution of the chart animation

I have been working on a horizontal bar chart. I added transition to the width attr of the rects from 0 to the desired value and they worked fine. Then I added some circle elements and made them "...
0
votes
0answers
11 views

How to mock a un-export (private) function inside user module using Jest

I have a "private" function which wraps the common functionality for an API request and I have a bunch of "public" functions to fire the actual requests with request configuration object (see below in ...
0
votes
0answers
8 views

Unable to set ob_flush live data into textBox inside bootstrap modal

I am trying to set the value of a textbox which is inside bootstrap modal which is opened by javascript. The value which is required to be set in textBox is derived from ob_flush. The following ...
0
votes
0answers
14 views

Routable tab in default route cause blank screen

I'm using a browser platform in Cordova. When I add 'tabs' to routes, I see a blank page. I know this problem is from the default route. But change in js and HTML code, not change the result. and I ...
0
votes
0answers
8 views

How to add Mobile device support to my existing Exit intend Popup script

Exit Popup intelligently detects the mouse behaviors and then pops up a modal window when your visitors are about to leave the current web page. This is how I have create a function to show it on ...
-1
votes
1answer
24 views

How to save settings on webpage? [on hold]

Have a page with character settings (select, checkbox, etc.). I need to save that on my server and do that visible after reloading the page. How to do it correctly?For example:<form><...
-1
votes
0answers
13 views

My web page takes longer time to load after adding json layers

So I am trying to develop something using leaflet. But I want to allow users to be able to overlay couple of my json layers (example a layer showing hospitals and restaurants) on my original web map....
0
votes
0answers
8 views

Javascript Client Side Editor

Dears,I need to learn to make active schematic website such as the following :http://www.partsim.com/simulatorhttps://easyeda.com/editor#id=817e5fbef04e4725bb8c6f2c6f4d4b25|...
0
votes
2answers
21 views

How do I load a html file?

How do I load a html file in a JavaScript function?I am working on an coding assignment and I am having a hard time trying to find this information.
0
votes
4answers
34 views

JS update nested object key with string of key names concatenating with “.”

Lets say that I have this object:var obj={level1 :{level2: {level3: {title: "winner"}}}}Now I want to update the title key using the next string (notice, ...
0
votes
0answers
9 views

How to get files dynamically from folder in webpack javascript

I am trying to build a small application in VueJs with webpack, where I want to includes a config/routing files dynamically from folders. I have a folder structure something like this:plugins|----...
0
votes
0answers
7 views

fullcalendar selectedEvent var changes value from 'Object' to 'Not available'

When an event is clicked, it hits the break point and has a value 'object'. It needs this value the btnDelete function:$('btnDelete').click(function () {if (selectedEvent !=null &&...
4
votes
3answers
33 views

Why innerText property of html element only showing innerText of body element

console.log(document.getElementsByTagName('html')['0'].textContent);console.log(document.getElementsByTagName('html')['0'].innerText);<!DOCTYPE html><html lang="en"><head>...
0
votes
0answers
11 views

html game alternative for touch jquery drag and drop

i am building a simple drag and drop game where the player can sort the card div in an order to check a if it is a valid order or not.Currently im using jquery UI-draggable, UI-droppable. But i'm ...
0
votes
0answers
25 views

how save to state and save to local variable result from fetch api

I have a function that returns json:const mapDispatchToProps=dispatch=> {return {articleDetail: (id)=> {return dispatch(articles.articleDetail(id));}}};I get ...
2
votes
0answers
23 views

JS: Using Asynchronous Functions to Pause Operation

I am creating a web-scanner for Google search results. I want the user to be able to pause the program while it is searching for results. Originally I tried to pause it using a while loop but that ...
0
votes
1answer
10 views

Is there a way to analyze the amplitude from a spotify song using p5.js in browser?

I am attempting to make a Spotify visualizer as a personal project, but can't seem to find a way to analyze the sound before it is played through the browser. I have the Spotify player playing music ...
1
vote
1answer
30 views

How to make open modal when click link in jquery

I want create a modal popup. I created CSS for its style and finally it is completed but as I'm not familiar with JQuery or JavaScript I am not able to create a function that animates and opens the ...
1
vote
0answers
20 views

Global Firebase Reference

I am having a bit of trouble getting a firebase key into a function for some reason. I can log the correct key from the other functions on the page but not one of them, I'm sure I'm missing something ...
1
vote
1answer
34 views

Render methods should be a pure function of props and state

I am receiving the error of Warning: Cannot update during an existing state transition (such as within render). Render methods should be a pure function of props and state.. It appears that it is ...
0
votes
0answers
10 views

web3 error: BigNumber Error: “new BigNumber() not a base 16 number: ”

I'm trying to make this simple Dapp work where I'm sending the variables nombre and edad to the setInstructor() function and then returned by the getInstructor() function. The problem is that I keep ...
2
votes
6answers
58 views

how to copy input field value when checkbox is checked?

I have a form in which there is a local and permanent field .I want to copy all local field to permanent field if user checked the checkbox. or if user unchecked the checkbox i need to blank the all ...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,