Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
3 votes
1 answer
566 views

SetTimeout to populate Javascript Object while a function looped AJAX requests to get data

I wrote some code that will get the name and data of a node or multiple of nodes and put them in an object (seriesData) so I can use said object for a chart (renderChart). I used setTimeout() so ...
Bewarden's user avatar
3 votes
1 answer
690 views

Process array with x parallel executions

I wanted to create a function in JavaScript using jQuery's Deferred which executes a given function for each element in an array. The function is intended for ...
cramopy's user avatar
  • 203
3 votes
1 answer
196 views

jQuery wait for all paginations

I want to download data for all of my repos from the Github API. Github paginates their responses and includes a header Link type:"next" when there's another page ...
irbanana's user avatar
  • 133
7 votes
1 answer
276 views

Make Simultaneous HTTP Requests That Resolve Into a Single Return

This week, in an ongoing job search, I was tasked with the following pre-screening question: Make two simultaneous http requests. Use the language and library of your choice. Make sure the results ...
srage's user avatar
  • 222
4 votes
1 answer
93 views

Controller for a vehicle servicing AJAX app

I am working on a codebase that operates in the following manner: ...
user1477388's user avatar
5 votes
1 answer
109 views

Process chain approach

I've been researching about JavaScript and jQuery function chaining and different callback techniques. I am trying to create a very generic code that allows chaining, and in a way that I may create ...
Maurício D'Angelo Fernandes's user avatar
2 votes
1 answer
2k views

Simplify double AJAX request for jQueryUI's autocomplete widget

I'm using jQueryUI's Autocomplete widget for a product search. The data is in a database, so as the souce I passed it an AJAX request. My problem is, that I need some data about the currently focused ...
PeterInvincible's user avatar
3 votes
1 answer
2k views

Solving the Shortest Path problem (little bit of TSP, too)

Some background info: I'm working at a shipping company and the company's web developer has been fired a week ago. My boss knew that I had some knowledge in web development, so until we get a new ...
PeterInvincible's user avatar
6 votes
1 answer
2k views

Load JSON file into model using Javascript / jQuery (deferred, asynchronous)

As a beginner I am always determined to improve myself. I've got written the following Code using jQuery that is working fine. However, I am sure that there are cleaner ways for achieving the same. ...
user3546614's user avatar
0 votes
1 answer
66 views

Processing a collection of objects, one at a time, with an asynchronous method.

I currently use setInterval and a wait flag to process this collection. Is there a cleaner way? ...
Sean Anderson's user avatar
4 votes
1 answer
1k views

Custom function extending jQuery.Deferred

I couldn't find an example on how to have a custom function inherit jQuery's functions while leaving the original jQuery function I'm inheriting from unchanged (I wanted my function to have a ...
CheapSteaks's user avatar
6 votes
1 answer
6k views

Loading JavaScript files asynchronously

I need to get some scripts from the different social networking site and cache them. I want the function to be asynchronous, and non-blocking. I have settled with a script, but I am not really sure ...
Saif Bechan's user avatar