root/other-projects/nz-flag-design/trunk/similarity-2d/display-flags.jsp @ 29621

Revision 29621, 1.0 KB (checked in by davidb, 5 years ago)

Changes after some debugging with a larger set of images

Line 
1<!DOCTYPE html> 
2<html>
3  <head>
4    <meta charset="utf-8"/>
5  </head>
6
7  <body>
8
9    <div style="display: none;">
10
11      <!--
12     Set up a fallback position in case this page is accessed outside
13     of a JSP context (i.e., the JSP blocks aren't executed)
14    -->
15      <script>
16    var is_jsp_active = false;
17    var img_list = [ "Images/nz.gif" ];
18      </script>
19
20      <%@include file="flag-functions.jsp" %>
21
22      <!-- If JSP active, sets 'is_jsp_active' to true -->
23      <%@include file="list-flags.jsp" %>
24
25    </div>
26
27    <script>
28
29      if (!is_jsp_active) {
30        document.write("<div>Web server is no JSP active.  Unable to run flag comparison</div>");
31      }
32      var i;
33
34      var root_img_re = /^.*\/(.*?)\..*?$/;
35
36      for (i=0; i<img_list.length; i++) {
37    var img   = img_list[i];
38        var img_matches = root_img_re.exec(img);
39    var title = img_matches[1];
40
41        document.write("<img src=\"" + img_list[i] + "\" "
42        + "title=\"" + title + "\" "
43        + "style=\"padding: 4px;\">\n");
44      }
45
46    </script>
47
48  </body>
49
50</html>
Note: See TracBrowser for help on using the browser.