NIHVIVO-3510 fix to sparql query builder to work with empty Vitro

This commit is contained in:
brianjlowe 2011-12-14 21:31:46 +00:00
parent 7b422e883b
commit a30e1d5842
3 changed files with 33 additions and 6 deletions

View file

@ -49,8 +49,8 @@
var myPrefixAjax = new Ajax.Request( preurl, {method: "get", parameters: "", onComplete: function(originalRequest){
var response = originalRequest.responseXML;
var options = response.getElementsByTagName("option");
if (options == null || options.length == 0){
alert("Error: Cannot get all the prefix.");
if (options == null || options.length == 0) {
alert("Error: Cannot get all the prefixes.");
return;
}
for(i=0; i<options.length; i++)