r7092: added some js for formatting table results in a nicer fashion
[samba.git] / swat / esptest / exception.esp
1 <% page_header("columns", "ESP Exception test"); %>
2
3 <h1>Samba4 exception test</h1>
4
5 <form name="ExceptionTest" method="POST" action="@@request['SCRIPT_NAME']"> 
6     <input name="submit" type="submit" value="Generate Exception">
7     <input name="submit" type="submit" value="No Exception">
8     <input name="submit" type="submit" value="Cancel"><br>
9 </form>
10
11 <%
12 if (request['REQUEST_METHOD'] == "POST") {
13         /* if they cancelled then take them back to the list of tests */
14         if (form['submit'] == "Cancel") {
15                 redirect("/");
16         }
17
18         function TestFunction(arg1, arg2) {
19                  return "OK";
20         }
21
22         if (form['submit'] == "Generate Exception") {
23             write("I expect you to die Mr Bond!<br>\n");
24             TestFunction("foo");
25         } else {
26             write("no exception<br>\n");
27             TestFunction("foo", "bar");
28         }
29 }
30 %>
31
32 and here is some filler text ...
33
34 <% page_footer(); %>