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

How can I turn a .cvs list into an option list using JavaScrip?

I have a .cvs list with names separated with semicolons: John Smith;Ola Nordmann;etc, and I was wondering how I can read the file and then print out the names like this:<select> <option>...

View Article


styling table headers in React

my problem is to color the column headers according to the function that is to be performed on it. like if it is column 0 and we choose to perform Addition in that column then it has to be red, If we...

View Article


I'm trying to update DOM with Sorted Numbers using css height bars

$(document).ready(function() { setTimeout(function() { generate(); }, 50); }); var random =[]; function generate() { random.splice(0,random.length); $('.freqInner').empty(); var i = 0; while (i <...

View Article

Insert an HTML tag at the beginning and end of a user's selection in a...

I have a contentEditable div in which I want users to be able to press a button and make the text they have selected bold. The way that I am doing it now uses window.getSelection.toString(); to get the...

View Article

from green to red color depend on percentage

I have a poll system and I want answers for this poll to be colored. For example: If it's 10% it would be red, if 40% it would be yellow and if 80% it would be green, so I want my javascript code to...

View Article


.each() doesn't push duplicate items

I am using .each() to push / inject html elements to dynamically create popover (for dictionary definitions). However I notice if the same word is repeated in a sentence the elements are not pushed...

View Article

JavaScript string manipulation

I am trying to create a function that builds a string made up of the characters of two given strings. The function has 3 arguments:searchString - a String that is scanned character by character to...

View Article

How to create an array entry for each line of a text file using node.js

I am having difficulty creating an array entry out of each line of a text file in node.jsMy array is called "temp." I am able to console.log each line in the following code:var temp = []; const...

View Article


Image may be NSFW.
Clik here to view.

Although rootState.user.user_data returns an object,...

I have a problem. Imagine this mutation:SET_USER(state, payload) { console.log("SET USER COMMIT") Vue.set(state.user_data, 'uid', payload.uid || payload._id) state.user_data.display_name =...

View Article


How to validate checkbox and if validated copy one textbox into another

Hi i have a form containing postal address and billing information. I want to copy postal address to billing information if information is same. I don't understand how i validate if checkbox is checked...

View Article

Create a list of elements

I want to create a list of recognized notes, but have an issue to do this. The note just changing one to another one.index.html<p id="message"></p> app.jsvar message =...

View Article

how to read an RGBA tuplet from an Objective C file and return colour values...

I created a library of custom colours in Objective C that I now want to use in JavaScript. Each custom colour is defined like so + (UIColor *)darkYellow { return [UIColor colorWithRed:(235.0/255.0)...

View Article

Google Map disappears after getting nearby locations

I am using the google maps api to display a list of nearby places using both the maps and places api.The map has markers that are preset on certain places, but the issue I am having is that when I try...

View Article


Image may be NSFW.
Clik here to view.

How to retrieve data from firebase correctly?

It's been a while since Ive coded so sorry about my vocabulary. I can't seem to load the data I want. The Concole Log shows the values already of everything instead of the childs. So my database is the...

View Article

How to perform case-insensitive in array of arrays in JavaScript?

I have an array of arrays. I need to set an array of arrays in a case-insensitive way. How to perform this?I've got this array and I need to set it to lowercase. var criminals = [ ["Paul White", "Roger...

View Article


Image may be NSFW.
Clik here to view.

Objects are brighter in threejs editor

So I've Imported an FBX object in the editor and it looks as follows:Perfect, that what I was expecting!but when I make my scene and import the same object, it looks like this:Waymore darker, but...

View Article

CSV to JSON Function - Uncaught TypeError: Cannot read property 'split' of...

I am trying to write a function that converts CSV to JSON. A sample CSV looks like below:"LNG,LAT,OBJECTID,NAME,ORGANIZATION,ZIP,PHONE,WEBSITE,DENTAL_PHONE,FULL_ADDRESS;...

View Article


Why does my JavaScript code get a "No 'Access-Control-Allow-Origin' header is...

Mod note: This question is about why Postman is not subject to CORS restrictions in the same way an XmlHTTPRequest is. This question is not about how to fix a "No 'Access-Control-Allow-Origin'..."...

View Article

Mouse hover over link to copy link text - Javascript - Google Chrome &...

I am very new to the world of Javascript. I've found some scripts that accomplish what I'm looking to do, but not perfectly, and the scripts don't seem to be maintained. I would like to create my own...

View Article

An infinite loop made by purpose blocks my code thought I don't want it to...

Hye, I started with javascript and made an infite loop by purpose. The problem is that it is not executing. Don't think I don't want an infinite loop, I do, but it is not working! The question is: is...

View Article
Browsing all 140220 articles
Browse latest View live


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