Actually, I may have found a solution.
The secret may be in these lines in the survey_runtime.js file
Code:
function showStartPopups(){
if(typeof showpopup=="undefined"){showpopup=1;}
if(typeof startPopups=="undefined"){startPopups=[];}
if(showpopup){
$.each(startPopups,function(key, text){
alert($("<div/>").html(text).text());// Parse HTML because of &#039;
});
}
}
A page loaded with errors contains this code (as an example)
Code:
showpopup=1;
startPopups=["One or more mandatory questions have not been answered. You cannot proceed until these have been completed.","One or more questions have not been answered in a valid manner. You cannot proceed until these answers are valid."];
whereas a page with no errors contains an empty startPopups array
Code:
showpopup=1;
startPopups=[]
therefore, checking for an empty startPopups array will get me the solution I require, it seems.