diff webapp/index.jsp @ 20:0bc1e3f788ee

Changed the name of the example page to index.jsp
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Fri, 06 Dec 2013 11:50:44 +0000
parents webapp/ExamplesPage.jsp@00cae11c09bd
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/webapp/index.jsp	Fri Dec 06 11:50:44 2013 +0000
@@ -0,0 +1,70 @@
+<%@ page contentType="text/html;charset=UTF-8" language="java" %>
+<html>
+    <head>
+        <title>Human Echolocation</title>
+
+        <%
+            String distStr = request.getParameter("dist");
+            int dist = 1;
+            boolean distSet = false;
+            if(distStr!=null && distStr.length()>0)
+            {
+                dist = Integer.parseInt(distStr);
+                distSet = true;
+            }
+        %>
+
+        <link rel="Stylesheet" type="text/css" media=all href="./StyleSheet.css" />
+        <link href="StyleSheet.css" rel="stylesheet" type="text/css" />
+        <link rel="script" type="text/javascript" href="script/jquery-1.10.2.min.js"/>
+    </head>
+
+    <body>
+        <form method="get">
+            <div style="text-align: center">
+                <table width="760" cellpadding="0" cellspacing="0">
+                    <tr>
+                        <td><img src="header_bg.jpg" alt="Header Image Not Found" width="779" height="72" /></td>
+                    </tr>
+                </table>
+                <br />
+
+                <h1>Human Echolocation WebApp Example Page</h1>
+
+                Input parameters:
+                <br>
+                Distance:
+                <input type="text" name="dist" size="8" value="<%=dist%>" >
+                <br>
+                <input type="submit" value="Generate">
+                <br>
+                <br />
+
+                <script type="text/javascript">
+                    try {
+                        var objXHR = new XMLHttpRequest();
+                    }
+                    catch (e) {
+                        try {
+                            var objXHR = new ActiveXObject('Msxml2.XMLHTTP');
+                        }
+                        catch (e) {
+                            try {
+                                var objXHR = new ActiveXObject('Microsoft.XMLHTTP');
+                            }
+                            catch (e)
+                            {
+                                document.write('XMLHttpRequest not supported');
+                            }
+                        }
+                    }
+                    objXHR.open('GET','HumanEcho?dist=<%=dist%>&',false);
+                    objXHR.send(null);
+                    document.writeln(objXHR.responseText);
+                </script>
+                <br>
+            </div>
+        </form>
+    </body>
+</html>
+