File: DicomImageViewer.html

package info (click to toggle)
pixelmed 20150917%2Bgit20151209.36f3174%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 25,900 kB
  • sloc: java: 110,939; xml: 88,803; makefile: 6,255; sh: 241
file content (40 lines) | stat: -rw-r--r-- 1,160 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<html>
<head>
<title>DicomImageViewer start with auto Java install</title>
</head>
<body>
	<script src="http://www.java.com/js/deployJava.js"></script>
	<script language="JavaScript"><!--
	
		// per "http://docs.oracle.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit"
		
		var ourWebstartApplicationName = "DicomImageViewer.jnlp"
		
        // get location of JNLP file relative to HTML page
        var dir = location.href.substring(0,location.href.lastIndexOf('/')+1);
        var ourWebstartURL = dir + ourWebstartApplicationName;
		
		var minimumVersion = '1.5'
		
		if (deployJava.isWebStartInstalled(minimumVersion)) {
			deployJava.launch(ourWebstartURL);
		}
		else {
			if (deployJava.installLatestJRE()) {
				intervalID = setInterval("launchOurJNLP()",100);	// no var so global
			}
			else {
				alert("Cannot run without Java "+minimumVersion+" or more recent installed, and cannot automatically install it");
			}
		}
		
		function launchOurJNLP() {
			if (deployJava.isWebStartInstalled(minimumVersion)) {
				clearInterval(intervalID);
				deployJava.launch(ourWebstartURL);
			}
		}

	//--></script>
</body>
</html>