View Full Version : Help optimizing javascript randomize pages code for eLearning assessment module

12-22-2011, 08:38 AM

Im using a authoring tool to develop an elearning test course. The course is composed of several HTML pages with Buttons for the multiple choice test. The setup of the course is that it will only ask 10 questions out of a pool of 30 questions.

When the HTML & JS files are online, the test takes 20-40seconds to load. I believe it is related to the code that selects the 10 questions from the 30.

I've singled out the code that does the select random pages... Is there any way to optimize the code?

I've attached the HTML (in txt format) page where the javascript can be found.

Looking forward to your replies!

12-22-2011, 11:50 AM
Oh boy, that is one ugly piece of code. You could use Firebug's profiling tools to see what's actually causing the delay, or you could provide a live example, so we can see the thing in action. Short of that, I suspect you won't get any meaningful help without paying for it.