Greetings Chief Delphi members!
I’m from from FRC 2729 Storm Robotics and I was wondering if someone could help with an issue that we’re having with our Team Number Finder in JavaScript.
We can get one page of team numbers (500 numbers) off of any given page using The Blue Alliance api due to the fact that the HTTP request only executes on the last iteration of the for loop. The problem we are having is that when we try to get more than one page, the values become undefined.
If someone could look through the code and lend us a hand, that would be wonderful!
In Chrome I get a big comma separated list of teams from 1 to something in the 6000’s Note that the output has no guarantee of order since the HTTP requests are returning asynchronously.
hardcopi is right that it’s probably better to append to the div. Your implementation will work since you are appending output to a global string and then writing the whole string back out to the div every loop, but it’s not as clean
Thank you so much for your fix! If we use your version then I’ll make sure to credit you for the fix.
I also agree with hardcopi and I’ll possibly see what I can do about doing that, but for now, thanks again for now I believe we’ll use your version.
Again, thank you!