The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Javascript & Unexpected Results

Sorry for the vague title to the thread, but I couldnt think of a simple way of putting the problem that I have come up agaisnt.

I have been tasked with putting together a simple bandwidth test tool that can run through a browser with the least amount of user interaction. To do this I have created a javascript that downloads an image, times this download, reloads the page passing the values from the previous test - my current script iterates ten times.

The problem that I have encountered is that when I view the summary results at the end of the test run, alot of the timings are either "infinite" or "0" and these are randomly placed in the results, i.e. if I re-run the script I will get infinite or 0 on different sets.

When the script gets to the 11 iteration it dives out to another page that simply displays the results of the test run, for the sake of post size I havent included the code here as all it is is a simple script that takes the command line args splits them up by ":" and pumps the results into a table.

As somebody who has about 24 hours experience in Javascript I am sure that I am missing something here that is blatently obvious to most if not all, I wont admit that I have failed, rather acknowledge that I have found a 1000 ways that it doesnt work :-)