Tagged Questions
0
votes
2answers
16 views
set a year range in javascript
How can I define an array range without specifying each option in javascript?
Right now I have this:
var year = {
'0': '2000',
'1': '2001',
'2': ...
0
votes
0answers
11 views
How to use usemap with a FadeSlideShow?
I'm trying to set the usemap attribute to one of these images which are added to the imagearray. The code below is a FadeSlide in javascript, but I'd like to instantiate some map attributes over one ...
0
votes
3answers
54 views
How can i process huge javascript array (array of 20 mil coordinates) in browser side efficiently?
here's my code:
<!DOCTYPE html>
<html>
<head>
<title>d3 Practice</title>
</head>
<body>
<script src="./vislibs/d3.v3.min.js"></script>
...
0
votes
2answers
55 views
Why is my array undefined
So I'm trying to create an array of color strings that a drop down has its options' values equal to the index of the array, however when I alert either the entire array or just a value it returns ...
-5
votes
0answers
40 views
JavaScript array: find duplicate values and remove it but keep first occurrences [duplicate]
Suppose I have an array as below:
["b", "a", "c", "b", "d", "e", "b", "f"];
We know that value a occur three time, but how can we keep the first occurrence of a value and remove the other ...
0
votes
2answers
32 views
Arrays disappear outside of JSON request
I am attempting to set up an array with the various properties of a YouTube video (you may be thinking this is somewhat superfluous, however I am planning on adding other sources in the future). I am ...
0
votes
1answer
41 views
How to append to JS associative array
I have an existing multidimensional associative array with this structure. It has 3 elements. Each of the subarrays has 3 elements.
...
0
votes
1answer
13 views
javascript extjs array group multi value
i have a problem. i don't understand how group an array multidimensional for two o more values and then sum the field. i just tried with underscore.js but it allows only grouped by value.
i'm use ...
0
votes
0answers
9 views
javascript file array is not being appended to the FormData object when using Firefox
The following code is not working in Firefox 21 even though it corresponds to Mozilla docs on how to implement FormData in ajax. (The code DOES work in both Chrome and Opera).
var data = new ...
0
votes
1answer
29 views
change value of multi-dimensional array
I want to change a value of a multi-dimensional array, but this code keeps telling me
"cannot set property '5' (which is the length of the array I guess) of undefined"
obj.figures = new Array(
new ...
0
votes
2answers
50 views
match two arrays or objects in javascript
I have two javascript objects
var category = new Object();
I add some attributes to the object as
category.Hot = "Red";
category.Cold = "Blue";
category.Warm = "Yellow";
I have another object ...
2
votes
3answers
32 views
add element to ordered array in CoffeeScript
I have a sorted array, which I add elements to as the server gives them to me. The trouble I'm having is determining where to place my new element and then placing it in the same loop
in javascript ...
1
vote
3answers
30 views
Array.shift() and modify value in a single line?
This Javascript code removes the first file name from a file list and then removes its extension:
var fileNoExt = filelist.shift();
fileNoExt = fileNoExt.substr(0, fileNoExt.lastIndexOf('.'));
I'm ...
1
vote
0answers
41 views
javascript rearrange arrays in permutations for jquery selectors
Not sure of the best title for this question so any revision suggestions welcome...
say i have 1 javascript array that look like this:
group[g1] = [v1,v2,v3]
group[g2] = [a1,a2,a3]
group[g3] = ...
0
votes
0answers
12 views
WebWorker - Transferring an array which contains objects
I have an array which I need to transfer from a WebWorker back to the main thread. As far as I know, only ArrayBuffers and TypedArrays are transferable and anything else is copied instead of ...