r8722: make the menu handling considerably saner and easier to follow. The whole
[jra/samba/.git] / swat / esptest / exception.esp
1 <% page_header("columns", "ESP Exception test", "esptest"); 
2    include("/scripting/forms.js");
3 %>
4
5 <h1>Samba4 exception test</h1>
6
7
8 <%
9 var f = FormObj("ExceptionTest", 0, 2);
10 f.submit[0] = "Generate Exception";
11 f.submit[1] = "No Exception";
12
13 f.display();
14
15 if (request['REQUEST_METHOD'] == "POST") {
16         function TestFunction(arg1, arg2) {
17                  return "OK";
18         }
19
20         if (form['submit'] == "Generate Exception") {
21             write("I expect you to die Mr Bond!<br>\n");
22             TestFunction("foo");
23         } else {
24             write("no exception<br>\n");
25             TestFunction("foo", "bar");
26         }
27 }
28 %>
29
30 and here is some filler text ...
31
32 <% page_footer(); %>