Unfortunately, the SimpleViewer-Pro API does not contain a method to get the version number.
You could perhaps manually code some JavaScript to extract the relevant information from the comments at the top of the 'svcore/js/simpleviewer.js' file. (Read and return the second line of the file, stripping out everything before the word 'SimpleViewer'.)
Here is a JavaScript function which you might be able to use/adapt to your own needs.
function getVersion(file) {
var xmlhttp;
if (window.XMLHttpRequest) {
xmlhttp = new XMLHttpRequest(); // Code for Chrome, Firefox, Internet Explorer > 6, Opera and Safari
} else {
xmlhttp = new ActiveXObject('Microsoft.XMLHTTP'); // Code for Internet Explorer 5 and Internet Explorer 6
}
var result;
if (xmlhttp !== null) {
xmlhttp.open('GET', file, false);
xmlhttp.send();
var text = xmlhttp.responseText; // Complete text of file
var lines = text.split('\n'); // Split text into lines using line feed as separator
var line = lines[1]; // Second line of text containing version
var index = line.indexOf('SimpleViewer'); // Start of 'SimpleViewer' text
var len = line.length; // Length of second line of text
result = line.substring(index, len); // Second line of text starting at 'SimpleViewer'
var pro = line.indexOf('Pro'); // Start of 'Pro' text
if (pro === -1) {
result = result.replace('SimpleViewer', 'SimpleViewer-Standard'); // If not Pro, change 'SimpleViewer' to 'SimpleViewer-Standard'
}
}
return result;
}
var version = getVersion('svcore/js/simpleviewer.js');
alert(version);
Steven Speirs
SimpleViewer Support Team