0
votes
1answer
28 views

Javascript/jquery iterate async problems

I would like to iterate through a certain amount of pages, and populate them with content using ajax calls. The problem is, when I put the ajax calls inside the iteration function it has problems with ...
1
vote
1answer
20 views

How to detect what class an object in an array is in JavaScript

I'm working on a highly object oriented project in JavaScript. I have an array[] of objects of different classes and I'm iterating through it and I want to check the class of the object at array[i]. ...
0
votes
3answers
47 views

How to iterate over an array and remove elements in JavaScript

I have an array of elements and need to remove certain ones from it. The problem is that JavaScript doesn't seem to have a for each loop and if I use a for loop I run into problems with it basically ...
0
votes
3answers
76 views

php countering in javascript doesn't work

okay here is my code : var co = 0; var comp = ''; <?php $i = 0;?> while (co < <?php echo $db->count_rows(); ?>) { if ((parseInt(value) >= <?php echo $mfr[$i] ?>) ...
1
vote
1answer
35 views

How can i patch this unwanted and strange iteration in javascript?

I made this simple script for searching video on YouTube but, there is a strange echo of this code: var nPageToken = response.nextPageToken; if (nPageToken){ ...
0
votes
1answer
40 views

Iteration on JSON of JSON

I have this problem: I have a JSON object and I want to iterate on it in a javascript function, but it is composed of other JSON objects. It is, for example: [ {"id"="1", ...
0
votes
2answers
87 views

Writing a recursive function which iterates through an unknown depth of nested loops

Given an array of values: var values = new Array(); array.push(2); array.push(3); array.push(4); I'd like to create an iterative function which can store every possible combination of values, ...
2
votes
2answers
47 views

Iterating over parent elements

I have some HTML that looks like this (SAMPLE ONE): (there are many of these, they are questions) <tr id="q_19030" class="q_grid " style="background: none repeat scroll 0% 0% yellow;"> <a ...
0
votes
2answers
38 views

Better way to have an key - value relationship with guaranteed order iteration javascript?

I am building a little project of mine and have found no other solution to having a key value relationship with the order of iteration guaranteed. What I have come up with so far is this, var Plate ...
1
vote
1answer
48 views

Am I taking the right direction with the logic?

Let's assume I have the following elements somewhere in my HTML: <div class="container"> <div class="box first">I have a height of 100</div> <div class="box">I have a ...
0
votes
2answers
43 views

Counting properties in an array

I am trying to count properties in a dynamically generated array. The array programs is created inside an object as follows: state_list.push({name: state, undergrad: 0, grad: 0, total: 0, programs: ...
1
vote
4answers
199 views

Focus next input once reaching maxlength value

How can I focus the next input once the previous input has reached its maxlength value? a: <input type="text" maxlength="5" /> b: <input type="text" maxlength="5" /> c: <input ...
-6
votes
1answer
50 views

Iteration- Javascript [closed]

<html> <body> <script> var namIn = window.prompt( "Enter Your FULL Name:" ); var namAr = namIn.split(""); var namArLen = namAr.length; document.write(namAr + "<br /> Length: " ...
0
votes
1answer
34 views

Iterating over array and using splice() updates the parent array?

When a user clicks a button, I'm grabbing the availableTags array, storing it in a new var tagsToWorkWith. I then iterate over tagsToWorkWith and run moveTag() on each row in order to move every tag ...
-1
votes
2answers
81 views

Iterate through elements of a table using jQuery

I am trying to get all td's from a particular row. Here is the code <script> $(window).scroll(function() { var widthArray = new Array(); var i=0; $('#firstRow >td').each(function(){ var ...

1 2 3 4 5 9
15 30 50 per page