Fix deprecated script syntax

Lectora 2007 Pro SP5... getting an error in Firefox when running this script:


function randomPage( testname, prev, bNoFeedback ) {

...

else if (processTest)

processTest(1)

...

}


Lectora is writing the above script on a page that points to a test with a randomized question pool. The "processTest" function doesn't exist on the page. Internet Explorer doesn't seem to have an issue, but Firefox chokes.


Please change if (processTest) to if (window.processTest) or if (typeof processTest != "undefined"), or use a try/catch block.


Also, how about updating the script language="JavaScript" tags to script type="text/javascript"? I know my version of Lectora is a bit behind, but... sweet Jebus, that was deprecated in 1996!

Discussions have been disabled for this post